小编Pin*_*kio的帖子

iOS模拟器太大了

iOS模拟器在屏幕上太大.我看到了所有的设置但没有.请帮我!

ios ios-simulator

93
推荐指数
2
解决办法
3万
查看次数

iOS7中的UITableViewCell indexPath崩溃

我有UITableViewCell一个UITableViewController.在我的手机有一个按钮,当你点击带你到另一个viewprepareforsegue.在prepareForSegue我这样做:

if ([[segue identifier] isEqualToString:@"MySegue"])
{
    UITableViewCell *cell = (UITableViewCell*) [[sender superview] superview];
    UITableView *table = (UITableView*)[[[sender superview] superview] superview];
    NSIndexPath *indexPath = [table indexPathForCell:cell]; 
}
Run Code Online (Sandbox Code Playgroud)

好!一切都运作良好.但是现在我已经用iOS7升级了xCode,当我点击单元格中的按钮时,一个错误出现给我,我不知道如何解决它:

[UITableViewCell indexPathForCell:]: unrecognized selector sent to instance 0x9e160b0
2013-09-20 16:30:44.427 MyApp[8212:a0b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITableViewCell indexPathForCell:]: unrecognized selector sent to instance 0x9e160b0'
*** First throw call stack:
(
    0   CoreFoundation                      0x024475e4 __exceptionPreprocess + 180
    1   libobjc.A.dylib                     0x01a5d8b6 …
Run Code Online (Sandbox Code Playgroud)

uitableview superview segue ios7

6
推荐指数
2
解决办法
6406
查看次数

将搜索字符串从UISearchBar转换为MK MapView地址

将UISearchBar添加到我的MK-MapView,并使用UISearchBar中编写的搜索字符串在地图上获取地址.后来我必须能够转换NSString中地图上指示的地址!你能帮我吗?我在谷歌搜索但我什么都不懂!请帮助我..我使用了这个项目,但是当我运行搜索时,地图仍然是相同的点:我使用的项目

objective-c uisearchbar mapkit mkmapview ios

3
推荐指数
1
解决办法
5195
查看次数

活动指标不会以相同的方法停止

在方法viewDidLoad中我初始化了一个ActivityIndi​​catorView.然后,在下面的方法中,我发送了活动指示符来启动.当我启动应用程序并运行if语句时,活动指示器会启动,但是当执行调度队列中的操作时,activityIndi​​cator不会停止.这里的方法:

-(void) tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{

    if([indexPath row] == [_myArray count]-2){

        [_activityIndicator startAnimating];

        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^{

            //Here I perform some operations

            [self.tableView reloadData];

            [_activityIndicator stopAnimating];
        });
    }
}
Run Code Online (Sandbox Code Playgroud)

我希望在调度队列中执行操作后停止活动指示器!

objective-c uitableview uiactivityindicatorview ios

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