This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSArray *subviews = [self.view subviews]; | |
for (NSInteger i = 0; i < subviews.count; i++) { | |
UIView *subview = [subviews objectAtIndex:i]; | |
if ([subview isKindOfClass:[UIImageView class]]) { | |
NSArray *imageSubviews = [subview subviews]; | |
for (NSInteger j = 0; j < imageSubviews.count; j++) { | |
UIView *imageSubview = [imageSubviews objectAtIndex:i]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Server.h | |
// NEPEquipmentScanner | |
// | |
// Created by Sam Green on 3/3/12. | |
// Copyright (c) 2012 __MyCompanyName__. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<key>CFBundleIcons</key> | |
<dict> | |
<key>CFBundlePrimaryIcon</key> | |
<dict> | |
<key>CFBundleIconFiles</key> | |
<array> | |
<string>Icon.png</string> | |
<string>Icon@2x.png</string> | |
<string>Icon-72.png</string> | |
</array> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)tappedRadioButton:(UIButton *)sender { | |
Radio *radio = [RadioSingleton sharedRadio]; | |
if (radio.isPlaying) { | |
[radio stopPlaying]; | |
} else { | |
[radio startPlaying]; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// UserTests.m | |
// TomManatosJobList | |
// | |
// Created by Sam Green on 4/25/12. | |
// Copyright (c) 2012 __MyCompanyName__. All rights reserved. | |
// | |
#import "UserTests.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSMutableArray *allCategories = [NSMutableArray array]; | |
for (NSString *key in [template allKeys]) { | |
NSArray *categoryItems = [template objectForKey:key]; | |
[allCategories addObject:categoryItems]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var testDecimal = numerator / denominator; | |
if(testDecimal < .1){ | |
numerator = 0; | |
denominator = 1; | |
} | |
else if(testDecimal > .29 && testDecimal < .35){ | |
numerator = 1; | |
denominator = 3; | |
} | |
else if(testDecimal > .59 && testDecimal < .70){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(wineRatingAverage==0) | |
_rateViewStatic.rating = 0; | |
else if(wineRatingAverage==0.5) | |
_rateViewStatic.rating = 0.5; | |
else if(wineRatingAverage==1) | |
_rateViewStatic.rating = 1; | |
else if(wineRatingAverage==1.5) | |
_rateViewStatic.rating = 1.5; | |
else if(wineRatingAverage==2) | |
_rateViewStatic.rating = 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title":"Braised Lamb Shanks", | |
"advertiserId":1, | |
"recipeId":"9431", | |
"url":"/recipe/braised-lamb-shanks", | |
"notes":"", | |
"modified":"2012-07-10 18:28:16", | |
"introduction":"<p>Braising is a wise choice of preparation for lamb shanks, as this cut is typically tough. The “low and slow” cooking process results in tender, juicy meat that just falls off the bone.</p>", | |
"imageURL":"/wp-content/uploads/secure/USWM-App-Advertisement.jpg", | |
"photoURL":"/wp-content/uploads/2011/12/64_1-150x150.jpg", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)createPDFFromContents { | |
NSString *pdfPath = [NSURL pathToDocuments:@"CostCalculator.pdf"]; | |
BOOL success = UIGraphicsBeginPDFContextToFile(pdfPath, self.bounds, nil); | |
if (!success) return; | |
CGContextRef pdfContext = UIGraphicsGetCurrentContext(); | |
UIGraphicsBeginPDFPage(); | |
[self.layer renderInContext:pdfContext]; |
OlderNewer