This file contains hidden or 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
| export JAVA_HOME=/Library/Java/Home |
This file contains hidden or 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
| NSMutableAttributedString *attrStr1 = [NSMutableAttributedString attributedStringWithString:@"inflation"]; | |
| [attrStr1 setFont:[UIFont fontWithName:@"CortinaSlate-Regular" size:62.8]]; | |
| OHAttributedLabel *label1 = [[[OHAttributedLabel alloc] initWithFrame:CGRectMake(90, 100, 588, 90)] autorelease]; | |
| label1.attributedText = attrStr1; | |
| label1.backgroundColor = [UIColor clearColor]; | |
| label1.textColor = [UIColor blackColor]; | |
| [self.view addSubview:label1]; |
This file contains hidden or 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
| NSDate *startTime = [NSDate date]; | |
| // Code goes here | |
| NSDate *endTime = [NSDate date]; | |
| NSTimeInterval executionTime = [endTime timeIntervalSinceDate:startTime]; | |
| NSLog(@"Response Time: %f", executionTime); |
This file contains hidden or 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
| [[TTAPIClient sharedInstance] getPath:@"videos.json" parameters:@{@"featured_videos" : @"y"} | |
| success:^(AFHTTPRequestOperation *operation, id response) { | |
| NSLog(@"Response: %@", response); | |
| } | |
| failure:^(AFHTTPRequestOperation *operation, NSError *error) { | |
| NSLog(@"Error fetching stuff!"); | |
| NSLog(@"%@", error); | |
| }]; |
This file contains hidden or 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
| self.view.backgroundColor = [UIColor colorWithPatternImage: [UIImage imageNamed:@"gingham.png"]]; |
This file contains hidden or 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)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration | |
| { | |
| if (UIDeviceOrientationIsPortrait(toInterfaceOrientation)) { | |
| // do portrait stuff | |
| } | |
| else { | |
| // do landscape stuff | |
| } | |
| } |
This file contains hidden or 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 (UIDeviceOrientationIsPortrait([[UIApplication sharedApplication] statusBarOrientation])) { | |
| // do portrait stuff | |
| } | |
| else { | |
| // do landscape stuff | |
| }; |
This file contains hidden or 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
| UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[@"something"] applicationActivities:nil]; | |
| self.popover = [[UIPopoverController alloc] initWithContentViewController:activityViewController]; | |
| self.popover.delegate = self; | |
| [self.popover presentPopoverFromBarButtonItem:sender permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; |
This file contains hidden or 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
| for (TTVideo *video in favorites) { | |
| NSLog(@"video.title: %@", video.title); | |
| } |
This file contains hidden or 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
| self.noFavoritesImageViewCenterXConstraint = [NSLayoutConstraint constraintWithItem:self.noFavoritesImageView attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeCenterX multiplier:1.0f constant:0]; | |
| self.noFavoritesImageViewCenterYConstraint = [NSLayoutConstraint constraintWithItem:self.noFavoritesImageView attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeCenterY multiplier:1.0f constant:0]; |