相关疑难解决方法(0)

如何在Xcode 4中设置NSZombieEnabled?

如何在Xcode 4中设置NSZombieEnabledCFZombieLevel执行我的可执行文件?

xcode objective-c nszombie xcode4

456
推荐指数
5
解决办法
11万
查看次数

如何在Objective-C中使用后台线程?

我在发展UIButton.

UIButton当我推动时,我正试图运行UIButton.

但我不能按下按钮,因为UIButton阻止了UIButton.

是否存在UIButton,我可以运行UIButtonUIButton并推UIButton

提前致谢.

multithreading objective-c ios

14
推荐指数
2
解决办法
1万
查看次数

重要的更改位置委托方法未被调用

我的所有代码都在AppDelegate.m中:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    self.window = [[UIWindow alloc]initWithFrame:[[UIScreen mainScreen]bounds]];

    _locationMgr = [[CLLocationManager alloc] init];
    [_locationMgr setDelegate:self];
    if([_locationMgr respondsToSelector:@selector(setAllowsBackgroundLocationUpdates:)])
        [_locationMgr setAllowsBackgroundLocationUpdates:YES];
    CLAuthorizationStatus authorizationStatus= [CLLocationManager authorizationStatus];

    if([launchOptions valueForKey:UIApplicationLaunchOptionsLocationKey] != nil) {
        NSLog(@"relaunching because of significant location change - restarting SLC");
        [_locationMgr startMonitoringSignificantLocationChanges];
    }
    else
    {
        if (authorizationStatus == kCLAuthorizationStatusAuthorizedAlways) {
            NSLog(@"launching with authorization to always use location - starting SLC");
            [_locationMgr startMonitoringSignificantLocationChanges];
        }
        else
        {
            NSLog(@"launching with no authorization to always use location - requesting authorization");
            if([_locationMgr respondsToSelector:@selector(requestAlwaysAuthorization)])
                [_locationMgr …
Run Code Online (Sandbox Code Playgroud)

delegates background properties objective-c ios

7
推荐指数
1
解决办法
979
查看次数

UITableView 延迟加载单元格数据

我需要在 UITableView 中实现某种延迟加载。

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    //... some initializations here

    //this is a function that pulls my cell data using helper class
    NSData *cellData=[MyDataClass dataForCellAtIndexPath:indexpath.row];

    //... here I populate pulled data to cell

    return cell;
}
Run Code Online (Sandbox Code Playgroud)

一切都很好,表视图滚动不顺畅,因为dataForCellAtIndexPath方法很慢。所以我需要通过调用此方法来实现将数据惰性填充到单元格中。我期望的结果是表格视图将平滑滚动,但单元格的内容将在绘制单元格后填充一点。请帮助我,该怎么办?

iphone objective-c uitableview

5
推荐指数
1
解决办法
3647
查看次数