This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This function will force a view to pop to its root when a UITabBarController button is pressed | |
- (void)tabBarController:(UITabBarController *)tabBarController | |
didSelectViewController:(UIViewController *)viewController { | |
// self is Application Delegate | |
[[self navigationController] popToRootViewControllerAnimated:NO]; | |
if ([viewController isKindOfClass:[UINavigationController class]]) { | |
[(UINavigationController *)viewController popToRootViewControllerAnimated:NO]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load html from local file | |
NSString *imagePath = [[NSBundle mainBundle] resourcePath]; | |
imagePath = [imagePath stringByReplacingOccurrencesOfString:@"/" withString:@"//"]; | |
imagePath = [imagePath stringByReplacingOccurrencesOfString:@" " withString:@"%20"]; | |
NSString *htmlFile = [[NSBundle mainBundle] pathForResource:@"localpage" ofType:@"html"]; | |
NSData *htmlData = [NSData dataWithContentsOfFile:htmlFile]; | |
[webView loadData:htmlData MIMEType:@"text/html" textEncodingName:@"UTF-8" baseURL:[NSURL URLWithString: [NSString stringWithFormat:@"file:/%@//",imagePath]]]; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
return [indexPath row] * 20; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Shows a simple alert box | |
*/ | |
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil message:@"Alert message" | |
delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; | |
[alert show]; | |
[alert release]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Shows/Hides the network activity indicator | |
(the little rotating icon between status bar time and network operator) | |
*/ | |
UIApplication* uiApp = [UIApplication sharedApplication]; | |
uiApp.networkActivityIndicatorVisible = YES; // to hide indicator, set this to NO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAxNQjrBv/O7X3zBorloD9U0bEUbKUFOUwpck2oHObHAKV1ATxHO7L6vgfcXkqbUr7MrNgapq8jI1jlyQv9Kays33PtDEQpbhKg8t4zX/0tU4XqZAhrMjmFWzaN0w5DjJeHriSArn4P54UHrOgzFGM8RISKCpGb5nL6RUK4WPcPhWYYUJmhhGx7p+CUX6T+r7hVz65cu8M8KjzEJGnjyORLOxXCOAj6EbdUDGDP8ZW8eM1N+xjsXt0p/s13VmIPy5WZ866iURWeZrgn4aXVyukRtmrAAI62eTJb+eILn3dOLX9ijBuYh1mgjDSO5zG47rxV1ETwTXsGUUfxMt31n8CMQ== [email protected] | |
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwY1YldkzNXPLi14dMl+MFh9Z85OY/DJIxOe86TdYfjLZ0UeDDby9MNWr4o0H7xyQ/XyDb3huppjjM/knVX8E5WPGrm6sAOS/RzK/FEPmurbtlXW18K4v9fiHbQSMd1SJxpwd8b4kICMFwaprLotqkUSlZevaRM/1T/FCUlXJ46OMAvJ9yYcjnxipMksIKLKhRFBES1z4E3PwBecQ1OPGgzsbahyFPGb8zJfWlZdOPI9eSTRlzl3HGEwMjZEwNpAmjdfr4ZrvyS+7u7Uacdnx9Qk/KI/746VDbRdFRheta2Wwz3soEIMGMmySJeoqL0lCHcmZvjtyhlYJxzmLfToImw== [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwY1YldkzNXPLi14dMl+MFh9Z85OY/DJIxOe86TdYfjLZ0UeDDby9MNWr4o0H7xyQ/XyDb3huppjjM/knVX8E5WPGrm6sAOS/RzK/FEPmurbtlXW18K4v9fiHbQSMd1SJxpwd8b4kICMFwaprLotqkUSlZevaRM/1T/FCUlXJ46OMAvJ9yYcjnxipMksIKLKhRFBES1z4E3PwBecQ1OPGgzsbahyFPGb8zJfWlZdOPI9eSTRlzl3HGEwMjZEwNpAmjdfr4ZrvyS+7u7Uacdnx9Qk/KI/746VDbRdFRheta2Wwz3soEIMGMmySJeoqL0lCHcmZvjtyhlYJxzmLfToImw== [email protected] |
NewerOlder