在我的应用程序中,我正在使用UITableview.在那个委托方法中,如果我做了任何操作,那么就不会发生.
例如,我在tableview中有3行
如果我选择1行(indexPath.row == 0)则不会发生任何事情
如果再次选择2行(indexPath.row == 1),现在它是登录控制台indexPath.row == 0这是以前的值.
如果再次选择1行,则记录其前一个值indexPath.row = 1.
为什么会这样.
- (void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath
{
CustomerInfoViewController *customer = [[EquipmentViewController alloc]initWithNibName:@"CustomerInfoViewController" bundle:nil];
EquipmentViewController *equpment = [[EquipmentViewController alloc]initWithNibName:@"EquipmentViewController" bundle:nil];
ContactsViewController *contacts = [[ContactsViewController alloc]initWithNibName:@"ContactsViewController" bundle:nil];
if(indexPath.row == 0)
{
NSLog(@"one %d",indexPath.row);
[detailsView addSubview:customer.view];
}
if(indexPath.row == 1)
{
NSLog(@"two %d",indexPath.row);
[detailsView addSubview:equpment.view];
}
if(indexPath.row == 2)
{
NSLog(@"three%d",indexPath.row);
[detailsView addSubview:contacts.view];
}
}
Run Code Online (Sandbox Code Playgroud)
请有人帮帮我.
提前致谢.
在我的应用程序中,我需要显示具有不同自定义字体的阿拉伯文本.我按照添加ttf文件的方案info.plist.
根据上述情况,我成功获得了不同字体样式的显示文本仅适用于ENGLISH文本.我为阿拉伯语字体样式做同样的事情,但在这里我没有得到.为什么会这样?
请任何人都可以帮助我
提前致谢.
我试图将以前没有ARC的客观C代码转换为ARC.我正在执行Xcode中的过程:文件>编辑>重构>转换为ARC.
但是我无法转换它,因为它会产生很多错误.我搜索了这个; 我正在尝试更改Xcode Target中的构建设置.
我将 Xcode 13 更新到 14。之前我能够在 Xcode 13 中实现构建。更新到 Xcode 14 后出现错误
Pods.xcodeproj 签署“ID-Card-Camera-IDCardCameraResources”需要开发团队。在签名和功能编辑器中选择开发团队。
嗨,我是android developpement的新手.在我的应用程序中,我需要从谷歌地图api方向webservice读取数据.
http://maps.googleapis.com/maps/api/directions/xml?origin=Toronto&destination=Montreal&sensor=false
我想打电话给这个网络服务.并从此链接读取数据.Plz任何人在这个问题上帮助我.
ios ×3
iphone ×2
android ×1
arabic ×1
cocoapods ×1
code-signing ×1
custom-font ×1
google-maps ×1
java ×1
objective-c ×1
swift ×1
uifont ×1
uitableview ×1
web-services ×1
xcode ×1