开发者

Cappuccino Redirect

开发者 https://www.devze.com 2022-12-28 23:27 出处:网络
What would the best practice be to redirect someone to another page in Objective-J (Cappuccino)开发者_如何学运维?Normally you wouldn\'t have multiple pages in a Cappuccino application. But assuming yo

What would the best practice be to redirect someone to another page in Objective-J (Cappuccino)开发者_如何学运维?


Normally you wouldn't have multiple pages in a Cappuccino application. But assuming you do want the user to leave your app, just use JavaScript. Objective-J is a superset of JavaScript, so it has everything JavaScript does.

- (void)redirectTo:(CPString)aLocation
{
    window.location = aLocation;
}

- (void)handler
{
    [self redirectTo:"http://www.google.com"];
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号