'NSInvalidArgumentException', reason: '-[__NSPlaceholderDictionary initWithObjectsAndKeys:]: second object of each pair must be non-nil. Or, did you forget to nil-terminate your parameter list?'
解決方法:[[NSDictionary alloc] initWithObjectsAndKeys 每個key和value都不能為nil,最後要加一個nil,另外數值型別的要加 @符號轉換成物件
TabBarController 跳到子Controller時候,隱藏tabbar屬性
解決方法:
ViewController *controller = [ViewController new]; controller.hidesBottomBarWhenPushed = YES;//隱藏bottomBar [self.navigationController pushViewController:controller animated:YES];
UITableView add到某個新增了手勢的View上,手勢阻擋點選Cell事件的問題。解決方案:
-(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch { // 若為UITableViewCellContentView(即點選了tableViewCell),則不截獲Touch事件 if ([NSStringFromClass([touch.view class]) isEqualToString:@"UITableViewCellContentView"]) { return NO; } return YES; }