How to convert NSIndexpath into NSInteger or simply int?

后端 未结 6 1040
轻奢々
轻奢々 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 20:52

    If

    NSIndexPath *p = ... // some indexpath
    

    then

    NSInteger row = p.row;
    NSInteger section = p.section;
    

    That's all!

提交回复
热议问题