This file contains hidden or 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
#pragma mark - UITextField Delegates | |
-(void)textFieldDidBeginEditing:(UITextField *)textField | |
{ | |
self.activeTextField = textField; | |
} | |
#pragma mark - Keyboard Notification Methods |
This file contains hidden or 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
[webView setBackgroundColor:[UIColor clearColor]]; | |
[webView setOpaque:NO]; |
This file contains hidden or 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
@property (nonatomic, weak) KGModalContainerView *containerView; | |
... | |
-(void)viewDidLoad { | |
[super viewDidLoad]; | |
KGModalContainerView *myContainerView = [[KGModalContainerView alloc] initWithFrame:containerViewRect]; // This is a strong reference to that view | |
[self.view addSubview:myContainerView]; //Here self.view retains myContainerView | |
self.containerView = myContainerView; // Now self.containerView has weak reference to that view, but if your self.view removes this view, self.containerView will automatically go to nil. | |
// In the end ARC will release myContainerView, but it's retained by self.view and weak referenced by self.containerView | |
} |
This file contains hidden or 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
//Start an activity indicator here | |
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ | |
//Call your function or whatever work that needs to be done | |
//Code in this part is run on a background thread | |
dispatch_async(dispatch_get_main_queue(), ^(void) { | |
//Stop your activity indicator or anything else with the GUI |
This file contains hidden or 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
// Custom tab bar implementation from http://www.wiredbob.com/2009/04/iphone-tweetie-style//-navigation.html | |
- (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item | |
{ | |
if (item == favouritesTabBarItem) { | |
UIViewController *fabViewController = [viewControllers objectAtIndex:0]; | |
[self.selectedViewController.view removeFromSuperview]; | |
[self.view addSubview:fabViewController.view]; | |
self.selectedViewController = fabViewController; | |
} else if (item == moreTabBarItem) { | |
UIViewController *moreViewController = [viewControllers objectAtIndex:1]; |
This file contains hidden or 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
// Create the UIViewController | |
MyViewController * viewController = [[MyViewController alloc] init]; | |
// Hide the tab bar | |
viewController.hidesBottomBarWhenPushed = YES; | |
// Push onto the view stack | |
[[self navigationController] pushViewController:viewController animated:YES]; |
This file contains hidden or 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
1. Duplicate your iPhone-Storyboard and rename it MainStoryboard_iPad.storyboard | |
2. Open this file any text editor. | |
3. Search for targetRuntime="iOS.CocoaTouch"and change it to targetRuntime="iOS.CocoaTouch.iPad" | |
4. Now save everything and reopen Xcode -> the iPad-Storyboard contains the same as the iPhone-file but everyting could be disarranged |
This file contains hidden or 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
git push --all | |
git push --tags |
NewerOlder