TextField 左側邊距

    //文本框左边留白
    UIView *leftView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 8, 40)];
    leftView.backgroundColor = [UIColor clearColor];
    self.searchTF.leftView = leftView;
    self.searchTF.leftViewMode = UITextFieldViewModeAlways;

推荐阅读更多精彩内容