Search This Blog

Tuesday, 30 October 2012

Hide Keyboard in xcode

       find the code for hiding keyboard on click of return.

For textField:

-(BOOL)textFieldShouldReturn:(UITextField *)textField{
 [textfield resignFirstResponder];

for TextView:

- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text {
    if([text isEqualToString:@"\n"]) {
          [textView resignFirstResponder];
    return YES;

Include delegate for UITextField and UITextView

Monday, 29 October 2012

"HTTP Connection" in blackberry

Hello ,
         So this was something awkward i encountered , my app was working fine on BB simulator but on device it keeps giving me HTTP Connection error.

       I checked my code many times but it was perfect , so i myself tried something that will sound awkward as the problem is.What i did is i switched off the device pull out the battery ...waited for atleast 10 seconds...put battery back restart the device connect it to system and debug my app ....and it is working fine now ....dont ask me the reason , i just sorted out the problem i myself don't know whats wrong before ...

Happy Programming....