【发布时间】:2012-04-23 07:44:26
【问题描述】:
我的代码无法在设备上运行,谁能帮忙..?
- (id) TweetPost : (id) args {
NSArray *arr = args;
_post = [args objectAtIndex: 0];
NSLog(_post, nil);
[_post retain];
ENSURE_UI_THREAD(Tweet, args);
}
- (id) Tweet : (id) args {
NSLog(@"Routine Twitter Module", nil)
if (![_engine isAuthorized]) {
UIViewController *controller = [SA_OAuthTwitterController controllerToEnterCredentialsWithTwitterEngine:_engine delegate:self];
if (controller) {
[[TiApp app] showModalController:controller animated: YES];
}
} else {
[_engine sendUpdate: _post];
}
}
在模拟器上执行此代码时,它可以正常工作,但在设备上,应用程序在NSLog(_post, nil); 之后立即在TweetPost 方法中崩溃。我认为这是由于ENSURE_UI_THREAD(Tweet, args);。谁能帮帮我..?
【问题讨论】:
标签: ios appcelerator-mobile titanium-modules