美文网首页
iOS小知识点(UIPickerView高度问题;textFid

iOS小知识点(UIPickerView高度问题;textFid

作者: 我是七月 | 来源:发表于2022-05-10 08:37 被阅读0次
UIPickerView高度问题

UIPickerView只有三个高度, heights for UIPickerView (162.0, 180.0 and 216.0),用代码设置 pickerView.frame=cgrectmake()... 如果设置其他高度输出框会有提示,无效的高度。(在5c设备上会有问题)

textFid的placeholder居中
UILabel * placeholderLabel = [self.goldcoilView valueForKey:@"_placeholderLabel"];
    placeholderLabel.textAlignment = NSTextAlignmentCenter;
NSIndexPath *path =  [tableview indexPathForRowAtPoint:CGPointMake(scrollView.contentOffset.x, scrollView.contentOffset.y)];
最近遇到需要对IQKeyboardManager “Done”的修改为”完成”
IQUIView+IQKeyboardToolbar.m文件里面,找到这一个,替换成initWIthTitle这个方法
//    IQBarButtonItem *doneButton =[[IQBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:target action:doneAction];
IQBarButtonItem *doneButton =[[IQBarButtonItem alloc] initWithTitle:@"完成" style:UIBarButtonItemStyleDone target:target action:doneAction];
#pragma mark - 长按手势

- (void)gestureLongPress:(UILongPressGestureRecognizer *)gestureRecognizer
{
   CGPoint tmpPointTouch = [gestureRecognizer locationInView:self.tableV0];
   if (gestureRecognizer.state ==UIGestureRecognizerStateBegan) {
       NSIndexPath *indexPath = [self.tableV0indexPathForRowAtPoint:tmpPointTouch];
       if (indexPath == nil) {
            NSLog(@"not tableView");
        }else{
           focusSection = [indexPath section];
           focusRow = [indexPath row];
            
           NSLog(@"%d",focusSection);
           NSLog(@"%d",focusRow);
            
            
           deletebtn.hidden =NO;
        }
    }
}

相关文章

网友评论

      本文标题:iOS小知识点(UIPickerView高度问题;textFid

      本文链接:https://www.haomeiwen.com/subject/iowxwttx.html