ios - Edit 2 labels from 1 text field -


good day! here issue - need change 2 different labels 1 text field. tried simple if-else logic, didn't work in case.

    func labeltextchanger() {      if fromusername.text == nil {         fromusername.text = textfileld.text     } else  {         replytousername.text = textfileld.text     } } 

ma case

if understand question correctly, need change text of 2 uilabels whenever editing uitextfield? if so, should use "editing began" or "editing changed" ibaction linked storyboard file. then, have uilabel's value change whatever uitextfield's text is.

@ibaction textfileideditingchanged {     fromusername.text = textfileid.text     replytousername.text = textfileid.text }  

Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -