iphone - UITextField becomeFirstResponder and overlap subviews -


i have 2 problems. create class "myfirstclass.m" , in "projectcontroller.m" create uitextfield txt. in "myfirstclass.m" have method take txt parameter. if inside class call method:

[txt becomefirstresponder]; 

it doesn't works. "myfirstclass.m" extends nsobject , "projectcontroller.m" extends uiviewcontroller. how can solve? because in same class "myfirstclass.m" have method create uitextfield add principal view, , when showed current textfield become first responder.

my second problem is: have uibutton , uitextfield, add them ad view, want that: uitextfield showed in foreground , uibutton in background. property of uitextfiled can set background image, want uibuton bigger uitextfield, want uibutton background , uitextfield foreground.

thanks in advance!

to first question: i'm assuming you're using interface builder. make sure uitextfield connected corresponding outlet of uiviewcontroller subclass. forgetting connect outlets in interface builder common problem objects not appearing on screen or not responding in code.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -