首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏一“技”之长

    iOS中UITextView方法解读 原

    iOS中UITextView方法解读 常用属性解读: @property(nonatomic,assign) id<UITextViewDelegate> delegate; 设置代理属性 @property *inputAccessoryView; 设置成为第一响应时弹出的副视图,副键盘视图 @property(nonatomic) BOOL clearsOnInsertion; 设置是否显示删除按钮 UITextViewDelegate

    1.3K40发布于 2018-08-16
  • 来自专栏mukekeheart的iOS之旅

    ios学习——键盘的收起

    resignFirstResponder]; 4 //[self.view endEditing:YES]; 5 return YES; 6 }    对于UITextView,相应的UITextViewDelegate 但是,我们可以根据UITextViewDelegate提供的方法对键盘输入的值进行判断,如果为回车键(\n)则设置当前UITextView不是第一响应者,否则不操作。 设置回车键的类型和代理,当前类是继承自UITextView的一个类 2 self.delegate = self ; 3 self.returnKeyType = UIReturnKeyDone ; //UITextViewDelegate

    2.6K60发布于 2018-03-01
  • 来自专栏mukekeheart的iOS之旅

    iOS学习——键盘弹出遮挡输入框问题解决方案

    一 文本框输入完整的响应过程    首先,我们要对UITextField和UITextView的输入输出进行控制,需要借助其对应的代理协议UITextFieldDelegate或UITextViewDelegate 当用户点击【clear/清除】按键时调用 textFieldShouldClear: 方法清除内容,当用户点击【return/完成】按键时调用 textFieldShouldReturn: 方法,注意:UITextViewDelegate 如果需要进行控制,我们知道其实在弹出之前是调用了UITextFieldDelegate或UITextViewDelegate的以下方法来控制是否使当前文本框设置为第一响应者( becoming the

    4.9K60发布于 2018-03-01
  • 来自专栏APP自动化测试

    函数响应式编程及ReactiveObjC学习笔记 (三)

    "ViewController.h" #import <ReactiveObjC.h> #import <objc/runtime.h> @interface ViewController ()<UITextViewDelegate viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. // 以UITextViewDelegate RACDelegateProxy RACDelegateProxy *delegateProxy = [[RACDelegateProxy alloc] initWithProtocol:@protocol(UITextViewDelegate greenColor]; // 设置代理为我们创建的RACDelegateProxy, 注意要转义不然会有警告 textView.delegate = (id<UITextViewDelegate _cmd); if (proxy == nil) { proxy = [[RACDelegateProxy alloc] initWithProtocol:@protocol(UITextViewDelegate

    1.2K20发布于 2019-10-15
  • 来自专栏TechBox

    史上最全的iOS之UITextView实现placeHolder占位文字的N种方法

    textView.textColor = [UIColor grayColor]; textView.delegate = self; [self.view addSubview:textView]; #pragma mark - UITextViewDelegate #import "WSViewController.h" @interface WSViewController () <UITextViewDelegate> @property(nonatomic placeHolder.contentMode = UIViewContentModeTop; [self.textView addSubview:placeHolder]; } #pragma mark - UITextViewDelegate UITextView的文本改变的代理方法 #import "ViewController.h" #import "WSTextView.h" @interface ViewController ()<UITextViewDelegate NSAttributedString alloc] initWithString:@"富文本"]; // self.textView = textView; } #pragma mark - UITextViewDelegate

    11.4K40发布于 2018-06-05
  • 来自专栏iOS知识点

    iOS UITextField 文本输入框

    ///别忘在 .h 中写代理 <UITextViewDelegate> ///UILabel 显示的文本只读,无法编辑,可以根据文字个数自动换行; ///UITextField 可编辑本文,但是无法换行

    4.1K20发布于 2020-01-19
  • 来自专栏Alice

    ios textView跟随键盘的移动

    实现效果: textview 能够跟随键盘的移动而移动 效果图如下: 下边贴上主要的代码: 1.创建textview @interface ViewController ()<UITextViewDelegate

    2.1K50发布于 2018-02-01
  • 来自专栏韩曙亮的移动开发专栏

    【iOS 开发】基本 UI 控件详解 (UIButton | UITextField | UITextView | UISwitch)

    实现 UITextViewDelegate 协议 :  @interface OCViewController : UIViewController <UITextViewDelegate> -- 实现 UITextViewDelegate 协议方法 :  - (void) textViewDidBeginEditing:(UITextView *)textView{ //开始编辑是显示导航条按钮 All rights reserved. // #import <UIKit/UIKit.h> @interface OCViewController : UIViewController <UITextViewDelegate All rights reserved. // #import <UIKit/UIKit.h> @interface OCViewController : UIViewController <UITextViewDelegate All rights reserved. // #import <UIKit/UIKit.h> @interface OCViewController : UIViewController <UITextViewDelegate

    9K20编辑于 2023-03-27
  • 来自专栏iOS开发~

    iOS_Swift运用AttributedString实现可点击文案

    attributedString view.addSubview(textView) 然后在代理方法里截获URL,并根据项目需求进行相应的处理: extension MOAttributedStringVC: UITextViewDelegate

    2.4K20编辑于 2022-07-20
  • 来自专栏学海无涯

    iOS开发之XLForm的使用

    UIViewController<UITableViewDataSource, UITableViewDelegate, XLFormDescriptorDelegate, UITextFieldDelegate, UITextViewDelegate

    1.8K80发布于 2018-05-03
  • 来自专栏用户4480853的专栏

    SwiftUI案例:尺寸自适应文本框

    uiView.contentSize.height } } } class Coordinator: NSObject, UITextViewDelegate

    4.3K20编辑于 2022-08-05
  • 来自专栏iOS技术

    iOS 文本输入控制(献上框架)

    , strong, nullable) YBInputControlProfile *yb_inputCP; @end @interface UITextView (YBInputControl) <UITextViewDelegate 看@protocol UITextViewDelegate <NSObject, UIScrollViewDelegate>可见,UITextViewDelegate代理有着父代理,里面包含了大量需要处理的代理方法

    1.6K120发布于 2018-05-07
  • 来自专栏一“技”之长

    iOS界面布局之三——纯代码的autoLayout及布局动画

    当我们文字多到一定行数,宽度会保持不变,文本框可以进行内容滑动,如果不用autolayout,这个功能会比较棘手一些,但是使用它,会发现这是如此的容易: @interface ViewController ()<UITextViewDelegate

    3.3K30发布于 2018-08-15
  • 来自专栏华仔的技术笔记

    要你命三千:老代码中的那些坑 define STRHASSBUSTR(str,subStr) ...

    看下这个聊天页面: @interface ChattingViewController () <UITableViewDataSource, UITableViewDelegate, UITextViewDelegate

    77950发布于 2018-05-17
  • 来自专栏mukekeheart的iOS之旅

    iOS学习——tableview中带编辑功能的cell键盘弹出遮挡和收起问题解决

    当用户点击【clear/清除】按键时调用 textFieldShouldClear: 方法清除内容,当用户点击【return/完成】按键时调用 textFieldShouldReturn: 方法,注意:UITextViewDelegate

    5.2K80发布于 2018-04-04
  • 来自专栏向治洪

    iOS AutoLayout全解

    s.height : defaultHeight; return 1 + height; } #pragma mark - UITextViewDelegate - (BOOL)textView

    6.3K60发布于 2018-02-06
  • 来自专栏青玉伏案

    iOS开发之微信聊天工具栏的封装

    24 //录音取消的回调 25 typedef void (^CancelRecordBlock)(int flag); 26 27 28 @interface ToolView : UIView<UITextViewDelegate

    2.9K80发布于 2018-01-11
领券