Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有两个视图控制器,我想UILabel在写的时候同时更新我的UITextView……例如,如果我正在写一些文本UITextView,它应该同时出现在UILabel不点击任何按钮或类似的东西……它应该动态更新......谢谢,
UILabel
UITextView
试试这个代码,为你的 textview 设置委托
- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text{ lbl.text=textView.text; }