本文主要是介绍ios cell button 高亮效果,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
iOS7解决方法:
viewDidLoad方法中:
#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_7_0[mTable setDelaysContentTouches:NO];
#endif
cellForRowAtIndexPath方法中:
#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_7_0for (id view in cell.subviews) {if ([NSStringFromClass([view class]) isEqualToString:@"UITableViewCellScrollView"]) {UIScrollView *s = (UIScrollView *)view;s.delaysContentTouches = NO;}}
#endif
iOS8解决方法:
viewDidLoad方法中:
#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_8_0for (UIView *v in mTable.subviews) {if ([v isKindOfClass:[UIScrollView class]]) {((UIScrollView *)v).delaysContentTouches = NO;}}
#endif
参考:http://www.68idc.cn/help/buildlang/ask/20150723457388.html
这篇关于ios cell button 高亮效果的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!