Has anyone submitted an applicaton using UIGlassButton? Was it approved?
I am trying to use a colored rounded button and do not want to use these hacks. How can I set a button background color on iPhone?
Why are we not allowed to use UIGlassButton?
Has anyone submitted an applicaton using UIGlassButton? Was it approved?
I am trying to use a colored rounded button and do not want to use these hacks. How can I set a button background color on iPhone?
Why are we not allowed to use UIGlassButton?
My application was accepted.
Cant use it because its not in the public api and therefore not in the documentation of the SDK, why dont they allow us to use it? who knows, but i can tell you if you use it your app will probably not get approved. Usage of undocument calls and classes usually leads to apps being rejected.
So i've been looking around for a example of implementing the UIGlassButton class. - but couldent find any. So i created one myself after some diggin'.
And i really dont know where to put it, so here it is. - And also: i thisk the solution should be OK by Apple. We'll see.
Anyway, here's the code;
Class $UIGlassButton = objc_getClass("UIGlassButton");
UIGlassButton *glassButton = [[$UIGlassButton alloc] initWithFrame:CGRectMake(30, 371, 274, 42)];
[glassButton setTintColor: [UIColor orangeColor]];
[glassButton setTitle:@"Create a Group" forState:UIControlStateNormal];
[self.view addSubview:glassButton];
Actually i just wanted a transparent glassbutton with an icon, so i've added:
[glassButton setBackgroundColor:[UIColor clearColor]];
[glassButton setImage:[UIImage imageNamed:iconPath] forState:UIControlStateNormal];
As easy as that.
Keep coding - peace.