Tuesday, July 27, 2010

Example Of Community Service Completion Letter

Gloss Gradient Button

Have you ever seen the following interesting article?


Starting from this article/code I developed a simple Object called GlossGradientButton that you can add to your iPhone/iPad views. To do this you must:
  • download and open my Xcode project linked below
  • copy GlossGradientButton files group into your project
  • #import "GlossGradientButton.h" into the target View header
  • write the following code into the target View implementation :

GlossGradientButton *glossGradientButton =

[[ GlossGradientButton alloc ]

initWithFrame : CGRectMake ( 75 , 164 , 170 , 80 )

withCornerRadius : 20

withTint :

[ UIColor colorWithRed : 0 green : 0.403 blue : 0.813 alpha : 1 ]

withBorderWidth : 1

withBorderColor :

[ UIColor colorWithRed : 0 green : 0.403 blue : 0.813 alpha : 1 ]

withTextColor :

[ UIColor whiteColor ]

withFont :

[ UIFont fontWithName : @"Marker Felt" size : 20 ]];


[glossGradientButton setTitle : @"Tap me!"

forState : UIControlStateNormal ];


[ self . view addSubview :glossGradientButton];


[glossGradientButton release ];



This is a preview of how the GlossGradientButton looks like:




This is a first working version , not perfect yet. Highlighted were expecially the Needs some upgrades.


Feel free to comment this post.

0 comments:

Post a Comment