Objective-C Course: Lesson one - Basics
Hello dear subscribers. Today we begin our course for the development of software for Apple mobile devices in the programming language Objective-C. This course will enable you to use the most advanced language features in your applications.
Today I'll show you the basic functions to be implemented by developers when working with the controls of the application. Sometimes, in order to realize the most simple things, developers can write 3 times more code than the samples that we provide at conferences Apple WWDC and other examples. These lessons actually designed for developers without much difficulty could find samples of source and import them into your projects.
After entering text in UITextField to hide the keyboard, the user must click on the background, then there will be an event that will roll your keyboard. Not to write dozens of lines of code, a professional programmer can hide the keyboard prescribing this code:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ [self.view endEditing:YES];}
The following standard feature in iOS devices, it shows UIAlertView. To invoke the pop-up notification without programming additional buttons, the programmer can write this piece of code and not use additional frameworks to improve the design of the application.
UIAlertView *errorAlertView = [[UIAlertView alloc]initWithTitle:@"British Airways" message:@"Your have Business Class ticket. Please use First Class ticket or contact with British Airways customer center." delegate:nil cancelButtonTitle:@"Close" otherButtonTitles:nil, nil]; [errorAlertView show];
Comments
Post a Comment