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
Post a Comment