Skip to content

Instantly share code, notes, and snippets.

View coreyfloyd's full-sized avatar

Corey Floyd coreyfloyd

View GitHub Profile
@coreyfloyd
coreyfloyd / gist:3369006
Created August 16, 2012 09:55
LIOLI spec

#Summary This app is used to sign in to their loseitorloseit.com account and post weigh ins to a remote API. Data will be formatted as JSON. Only the user's credentials will be persited locally. All other data will be fetched from the API as needed.

###Sign In Users can sign in, but cannot create accounts.

###Pending Weigh In Users are required to post periodic weigh ins. The app will let the user know if they have a pending weigh in or not.

###Weigh Ins

UIImage* bottomImage = [UIImage imageNamed:@"bottom.png"];  
UIImage* topImage    = [UIImageNamed:@"top.png"];
UIImageView* imageView = [[UIImageView alloc] initWithImage:bottomImage];
UIImageView* subView   = [[UIImageView alloc] initWithImage:topImage];
subView.alpha = 0.5;  // Customize the opacity of the top image.
[imageView addSubview:subView];
UIGraphicsBeginImageContext(imageView.frame.size);
[imageView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage* blendedImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
- (IBAction)gotoReviews:(id)sender
{
NSString *str = @"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa";
str = [NSString stringWithFormat:@"%@/wa/viewContentsUserReviews?", str];
str = [NSString stringWithFormat:@"%@type=Purple+Software&id=", str];
// Here is the app id from itunesconnect
str = [NSString stringWithFormat:@"%@289382458", str];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
}