当前位置: 动力学知识库 > 问答 > 编程问答 >

cocoa touch - Keyboard responding issue in IPhone?

问题描述:

I have an application with an updateprofile scrren in my application.i hav 6 textfields and a textview and a submit button at the end.I am enclosing what i am tryd.

 if(textField==firstname)

[lastname becomeFirstResponder];

else if(textField==lastname)

[Industry becomeFirstResponder];

else if(textField==Industry)

[Businessname becomeFirstResponder];

else if(textField==Businessname)

[Businessphone becomeFirstResponder];

else if(textField==Businessphone)

[businessstreet becomeFirstResponder];

else if(textField==businessstreet)

[city becomeFirstResponder];

else if(textField==city)

[state becomeFirstResponder];

else if(textField==state)

[zip becomeFirstResponder];

else if(textField==zip)

[Businesswebsite becomeFirstResponder];

else if(textField==Businesswebsite)

[Businessfacebookpage becomeFirstResponder];

else if(textField==Businessfacebookpage)

[Businesstwitterpage becomeFirstResponder];

else if(textField==Businesstwitterpage){

NSLog(@"becomeFirstResponder");

[BusinessDescription becomeFirstResponder];}

else if([BusinessDescription becomeFirstResponder]) {

[profiledBtn becomeFirstResponder];

}

return YES;

}

- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text

{

if ([text isEqualToString:@"\n"]) {

[textView resignFirstResponder];

//[profiledBtn becomeFirstResponder];

}

[profiledBtn becomeFirstResponder];

}

but after the textview the button is not getting focused.and also the scroll is disabled.Can anybody help me ....

分享给朋友:
您可能感兴趣的文章:
随机阅读: