Moving Onto The Next UITextField When ‘Next’ Is Tapped

You need to make your view controller the UITextField delegate, and implement the UITextField delegate method: – (BOOL)textFieldShouldReturn:(UITextField *)textField { if (textField == nameField) { [textField resignFirstResponder]; [emailField becomeFirstResponder]; } else if (textField == emailField) { // here you can define what happens // when user presses return on the email field } return YES; … Read more

how to get ip address of iphone programmatically [duplicate]

#include <ifaddrs.h> #include <arpa/inet.h> // Get the INTERNAL ip address – (NSString *)getIPAddress { NSString *address = @”error”; struct ifaddrs *interfaces = NULL; struct ifaddrs *temp_addr = NULL; int success = 0; // retrieve the current interfaces – returns 0 on success success = getifaddrs(&interfaces); if (success == 0) { // Loop through linked list … Read more

Set dimensions for UIImagePickerController “move and scale” cropbox

Not possible with UIImagePickerController unfortunately. The solution I recommend is to disable editing for the image picker and handle it yourself. For instance, I put the image in a scrollable, zoomable image view. On top of the image view is a fixed position “crop guide view” that draws the crop indicator the user sees. Assuming … Read more

Where can I find iPad Sample Code [closed]

If you’re a member of the Apple Developer Connection who’s paid for the $99/year iPhone developer license, the iPhone Dev Center has everything you need for iPad support, including: iPad Programming Guide iPad Human Interface Guidelines Sample Code When you get to the iPhone Dev Center, click “iPhone SDK 3.2 beta.”

UITableView With Multiple Sections

– (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 2 ; } – (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { if (section==0) { return [array1 count]; } else{ return [array2 count]; } } – (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { if(section == 0) return @”Section 1″; else return @”Section 2″; } – (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @”Cell”; … Read more