相关疑难解决方法(0)

如何将NSIndexpath转换为NSInteger或简单地转换为int?

我需要将nsindexpath var转换为NsInteger或简单地转换为int.例如:

 int rowIndex = [mGoogleBaseTable selectedRow];
 //mGoogleBaseTable is a NSTable type in Macdevelopement..
Run Code Online (Sandbox Code Playgroud)

&&

int rowIndex = [mGoogleBaseTable indexPathForSelectedRow];
//mGoogleBaseTable is a UITableView type in Iphone (iOS)Development.
Run Code Online (Sandbox Code Playgroud)

selectedRow返回NSInteger,但indexPathForSelectedRow返回NSIndexPath ..

请帮助我如何实现这一目标.

iphone cocoa-touch

49
推荐指数
4
解决办法
6万
查看次数

标签 统计

cocoa-touch ×1

iphone ×1