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
Operating System: OS X Mavericks | |
Ruby: 2.1.2 | |
Rails: 4.1.4 | |
Rspec result: | |
Peter in ~/developer/rails/sample_app on master* | |
⚡ autotest | |
loading autotest/rails_rspec | |
"/Users/Peter/.rbenv/versions/2.1.2/bin/ruby" -rrubygems -S "/Users/Peter/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.3/exe/rspec" --tty "/Users/Peter/Developer/rails/sample_app/spec/requests/static_pages_spec.rb" |
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
class MainViewController: UIViewController { | |
var viewController : UIViewController { | |
didSet { | |
addChildViewController(viewController) | |
} | |
} | |
init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) { | |
viewController = UIViewController() |
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
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool { | |
// Override point for customization after application launch. | |
window = UIWindow(frame: UIScreen.mainScreen().bounds) | |
let splitViewController = UISplitViewController() | |
let searchBoxViewController = SearchBoxViewController() | |
let searchResultDetailViewController = SearchResultDetailViewController() | |
let navigationController = UINavigationController(rootViewController: searchBoxViewController) | |
splitViewController.viewControllers = [navigationController, searchResultDetailViewController] | |
splitViewController.delegate = self | |
NSLog("%@", splitViewController.viewControllers) |
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
UIImage *backButtonImage = [UIImage imageNamed:@"left"]; | |
[backButtonImage imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; | |
UIButton *backBarButton = [UIButton buttonWithType:UIButtonTypeCustom]; | |
backBarButton.frame = CGRectMake(0.0f, 0.0f, backButtonImage.size.width, backButtonImage.size.height); | |
//[backBarButton setBackgroundImage:backButtonImage forState:UIControlStateNormal]; | |
[backBarButton setImage:backButtonImage forState:UIControlStateNormal]; | |
[backBarButton addTarget:self action:@selector(back) forControlEvents:UIControlEventTouchUpInside]; | |
backBarButton.layer.borderColor = [[UIColor whiteColor] CGColor]; | |
backBarButton.layer.borderWidth = 1.0f; | |
backBarButton.tintColor = [UIColor whiteColor]; |
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
UIView *headerView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.tableView.bounds.size.width, 50.0f)]; | |
headerView.backgroundColor = [UIColor colorWithRed:0.31f green:0.77f blue:0.83f alpha:1.0f]; | |
[self.navigationController setNavigationBarHidden:YES]; | |
self.view.backgroundColor = [UIColor colorWithRed:0.31f green:0.77f blue:0.83f alpha:1.0f]; | |
UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.tableView.bounds.size.width, 44.0f)]; | |
titleLabel.textColor = [UIColor whiteColor]; | |
[headerView addSubview:titleLabel]; | |
self.tableView.tableHeaderView = headerView; |
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> | |
@interface UIView (SMFrameAdditions) | |
@property (nonatomic, assign) CGPoint $origin; | |
@property (nonatomic, assign) CGSize $size; | |
@property (nonatomic, assign) CGFloat $x, $y, $width, $height; // normal rect properties | |
@property (nonatomic, assign) CGFloat $left, $top, $right, $bottom; // these will stretch the rect | |
@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
// | |
// TFHppleElement.h | |
// Hpple | |
// | |
// Created by Geoffrey Grosenbach on 1/31/09. | |
// | |
// Copyright (c) 2009 Topfunky Corporation, http://topfunky.com | |
// | |
// MIT LICENSE | |
// |
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
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Music Cell"]; | |
NSLog(@"%@", [[self.songsList objectAtIndex:indexPath.row] valueForProperty:MPMediaItemPropertyTitle]); | |
cell.textLabel.text = [[self.songsList objectAtIndex:indexPath.row] valueForProperty:MPMediaItemPropertyTitle]; | |
return cell; | |
} |
NewerOlder