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

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

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -