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
- (instancetype)init | |
{ | |
return [self initWithName:@""]; | |
} | |
- (instancetype)initWithName:(NSString *)name | |
{ | |
return [self initWithName:name | |
Gender:YES | |
AgeIs:@9 |
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
#define ARC4RANDOM_MAX 0x100000000 | |
- (CGFloat)randomFloatBetweenNumber:(CGFloat)minRange | |
andNumber:(CGFloat)maxRange | |
{ | |
return ((float)arc4random() / ARC4RANDOM_MAX) * (maxRange - minRange) + minRange; | |
} |
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)grow | |
{ | |
if (self.isFemale){ | |
if ([self.age integerValue] < 11){ | |
self.height = @([self.height floatValue] + [self randomFloatBetweenNumber:0 andNumber:1]); | |
} | |
else if ([self.age integerValue] >= 11 && [self.age integerValue] <= 15){ | |
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
- (NSString *)generatePartyList | |
{ | |
NSMutableArray *partyNamesArray = [[NSMutableArray alloc]init]; | |
for (Person *friend in self.friends){ | |
[partyNamesArray addObject:friend.name]; | |
} | |
return [partyNamesArray componentsJoinedByString:@", "]; |
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)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
NSMutableArray *arrayOfBooks = [[NSMutableArray alloc]init]; | |
[MPSAPI getBookLibrary:^(NSArray *books) { | |
for (NSMutableDictionary *book in books) { | |
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
#import <UIKit/UIKit.h> | |
#import "FISFilterObject.h" | |
#import "THConversationShareViewController.h" | |
@interface FISViewController : UIViewController<UIPickerViewDelegate, UIPickerViewDataSource, ConversationShareViewControllerDelegate> | |
@property (strong, nonatomic) UIImage *imageToProcess; | |
@property(strong, nonatomic) UIImage *savedImage; | |
@property (strong, nonatomic) IBOutlet UIImageView *theImageView; | |
@property (strong, nonatomic) IBOutlet UIPickerView *filterNamesPicker; |
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
#import "FISViewController.h" | |
@interface FISViewController () | |
@property(strong, nonatomic) CIContext *context; | |
@property(strong, nonatomic) CIFilter *filter; | |
@property(strong, nonatomic) CIImage *beginImage; | |
@property(strong, nonatomic) NSMutableArray *arrayOfFilters; | |
@property(strong, nonatomic) NSString *filtersName; | |
@end |
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
#import "THEditImageViewController.h" | |
#import "THCameraViewController.h" | |
#import "THEditImageViewController+Autolayout.h" | |
typedef void(^ButtonReplacementBlock)(void); | |
@interface THEditImageViewController () <UINavigationControllerDelegate, THCameraDelegateProtocol, UIScrollViewDelegate> | |
@property (nonatomic, assign) CGFloat zoomScale; | |
@property (nonatomic, assign) CGFloat maximumZoomScale; |
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
#import <UIKit/UIKit.h> | |
#import "THCameraViewController.h" | |
#import "THConversationShareViewController.h" | |
@interface THEditImageViewController : UIViewController <ConversationShareViewControllerDelegate> | |
#pragma mark - Object Properties | |
@property (strong, nonatomic) id <ConversationShareViewControllerDelegate> delegate; |
OlderNewer