Monday
Feb272012

Retina / Vector Clear Disclosure Style Button

For a new version of iTalkGhetto, I had to create a Clear Button. I decided to go for a disclosure style button. This photoshop image should be mostly future proof. It uses vectors so that is can scale to any size with no loss of clarity.  Feel free to use it as needed. If you wanna pay me for them, buy Cardio Track 2.  ;)


Download Clear Button

 

Monday
Jan162012

Subclassing UITableViewCells and animating for edits

Adding Labels to a subclassed UITableViewCell can make for a better, more custom looking interface. But when editing these cells, the newly placed labels don't reposition themselves like the built in UITableViewCells. Below is the code I created to make my date label, work more like a standard UITabelViewCell label. 

#import "GCRecordCell.h"

@interface GCRecordCell () {
CGRect dateOrigin;
CGRect dateMoved;
}

@end

@implementation GCRecordCell

@synthesize weightLabel;
@synthesize noteLabel;
@synthesize dateLabel;

- (void)awakeFromNib {
dateOrigin = dateLabel.frame;
dateMoved = CGRectMake(dateOrigin.origin.x - 32, dateOrigin.origin.y, dateOrigin.size.width, dateOrigin.size.height);
[super awakeFromNib];
}

- (void)setEditing:(BOOL)editing animated:(BOOL)animate {
[super setEditing:editing animated:animate];
if (editing) [UIView animateWithDuration:0.3 animations:^{ self.dateLabel.frame = dateMoved; }];
else [UIView animateWithDuration:0.3 animations:^{ self.dateLabel.frame = dateOrigin; }];
}

- (void)didTransitionToState:(UITableViewCellStateMask)state {
if (state <= 1) [UIView animateWithDuration:0.15 animations:^{ self.dateLabel.alpha = 1.0; }];
else if (state >= 2) [UIView animateWithDuration:0.15 animations:^{ self.dateLabel.alpha = 0.0; }];
[super didTransitionToState:state];
}

- (void)willTransitionToState:(UITableViewCellStateMask)state {
if (state >= 2) [UIView animateWithDuration:0.15 animations:^{ self.dateLabel.alpha = 0.0; }];
[super willTransitionToState:state];
}

@end

 

Wednesday
Jan112012

Negative Positive Rounded Rect Button

I had to create a button for a temperature converter that allowed you to flip a number from Negative to Positive. Here's what I came up with.  Feel free to download it and use it. It's all vector graphics so it's infinitely scalable. PSD Format.

Download Positive / Negative Button

Monday
Dec262011

Retina / Vector Disclosure Buttons

I'm far from a Photoshop expert, but I've had to learn a lot updating my apps to support retina graphics.  In OnTrac Cal, I used some custom disclosure style buttons.  I had to recreate them from scratch, using vector graphics to properly scale them for Retina Displays. These images should be mostly future proof.  Feel free to use them as needed. If you wanna pay me for them, buy Cardio Track 2.  ;)


 

Download Add / Edit Button

 

  

Download Add / Plus Button

 

 

Tuesday
Dec132011

SoBe Scenes 2.0 Source Code

Here is the Source Code for SoBe Scenes 2.0. It is not commented at all. I literally submitted the app a few hours ago, so I apologize for the rough edges. It includes 3 sample backgrounds. you can simply drop in your files, in place of my sample files and as long as you use the correct naming convention (bg-1xxx.JPG & bg-1xxx@2x.JPG) the app will "Just work". This app uses ARC and iOS 5. It is not backwards compatible with older iOS versions. If you have questions, you can email me at groovycocoa@gmail.com and I will get back with you when I can.

Thanks, 

Bry

Download SoBe Scenes 2.0 Source Code

PS: There is no "License". This code is free to use however you would like, Commericial or not. If you do use it, a mention somewhere would be nice.  ;)