xcode - Removing heightForRowAtIndexPath: compatibility with iOs7 -



xcode - Removing heightForRowAtIndexPath: compatibility with iOs7 -

in new ios8, if don't implement heightforrowatindexpath method, row multiple lines displayed right height. but, if want preserve compatibility ios7, need heightforrowatindexpath method implemented... how can implement in ios8?

you should utilize define rule:

#define system_version_greater_than_or_equal_to(v) ([[[uidevice currentdevice] systemversion] compare:v options:nsnumericsearch] != nsorderedascending)

here how should utilize it:

- (cgfloat)tableview:(uitableview *)tableview heightforrowatindexpath:(nsindexpath *)indexpath { if (!system_version_greater_than_or_equal_to(@"8.0")) homecoming 100.0;//your custom height here else homecoming uitableviewautomaticdimension; }

xcode uitableview ios8 heightforrowatindexpath

Comments

Popular posts from this blog

php - How to pass multiple values from url -

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

database - php search bar when I press submit with nothing in the search bar it shows all the data -