How to convert NSIndexpath into NSInteger or simply int?

后端 未结 6 1018
轻奢々
轻奢々 2021-01-30 20:34

I need to convert a nsindexpath var into NsInteger or simply an int. e.g:

 int rowIndex = [mGoogleBaseTable selectedRow];
 //mGoogleBaseTable is a NSTable type          


        
6条回答
  •  有刺的猬
    2021-01-30 21:08

    I prefer doing it this way

    NSNumber *selRow = [[NSNumber alloc] initWithInteger:indexPath.row];
    

提交回复
热议问题