Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- *
- * EAKKASIT TUNSAKOOL
- *
- */
- /*
- FONT
- UITextAttributeFont – Key to the font
- UITextAttributeTextColor – Key to the text color
- UITextAttributeTextShadowColor – Key to the text shadow color
- UITextAttributeTextShadowOffset – Key to the offset used for the text shadow
- */
- /*/////////////////////////////////////////////////////////////////////////////////////////
- *
- *
- //appdelegate.m
- //Color
- 1) define at the #define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
- [[UINavigationBar appearance] setBarTintColor:UIColorFromRGB(0xfa2371)];
- /*/////////////////////////////////////////////////////////////////////////////////////////
- *
- * Backgound Image
- */
- //[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"bg_hear_bar.png"] forBarMetrics:UIBarMetricsDefault];
- /*/////////////////////////////////////////////////////////////////////////////////////////
- *
- * Font
- */
- NSShadow *shadow = [[NSShadow alloc] init];
- shadow.shadowColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.8];
- shadow.shadowOffset = CGSizeMake(0, 1);
- [[UINavigationBar appearance] setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys:
- [UIColor colorWithRed:245.0/255.0 green:245.0/255.0 blue:245.0/255.0 alpha:1.0], NSForegroundColorAttributeName,
- shadow, NSShadowAttributeName,
- [UIFont fontWithName:@"HelveticaNeue-CondensedBlack" size:21.0], NSFontAttributeName, nil]];
- /*/////////////////////////////////////////////////////////////////////////////////////////
- *
- * Customizing the Color of Back button
- */
- //
- [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
- /*/////////////////////////////////////////////////////////////////////////////////////////
- *
- * Custom image to replace the default chevron
- */
- //
- [[UINavigationBar appearance] setBackIndicatorImage:[UIImage imageNamed:@"back_btn.png"]];
- [[UINavigationBar appearance] setBackIndicatorTransitionMaskImage:[UIImage imageNamed:@"back_btn.png"]];
- /*/////////////////////////////////////////////////////////////////////////////////////////
- *
- * Use Image as Navigation Bar Title
- */
- //
- //self.navigationItem.titleView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"appcoda-logo.png"]];
- /*/////////////////////////////////////////////////////////////////////////////////////////
- *
- * Icon system
- */
- /*delegate.h*/
- 1) define at the delegate.h
- @property(copy,nonatomic)UINavigationItem *navigationItem;
- @property(nonatomic, copy) NSArray *rightBarButtonItems;
- /*controller.m*/
- 2) Icon system
- //Adding Multiple Bar Button Items
- UIBarButtonItem *shareItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self action:nil];
- UIBarButtonItem *cameraItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCamera target:self action:nil];
- UIBarButtonItem *test = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemCompose target:self action:nil];
- NSArray *actionButtonItems = @[shareItem, cameraItem,test];
- self.navigationItem.rightBarButtonItems = actionButtonItems;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement