View UIKitTestUtils.swift
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
// Taken from: https://github.com/jeffh/TestingInSwift/blob/2d011f227f0ca1552680eba08f213792660ea32d/RandomAppTests/Support/UISupport.swift | |
// All of these functions here are inspired/ported from PivotalCoreKit | |
// https://github.com/pivotal/PivotalCoreKit | |
import UIKit | |
import Nimble | |
// emulates a tap on a bar button item. Does not support customViews | |
//func tap(barButtonItem: UIBarButtonItem) { | |
// SelectorProxy(target: barButtonItem.target).performAction(barButtonItem.action, withObject: barButtonItem) | |
//} |
View parse_thumbnail
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 Image = require("parse-image"); | |
Parse.Cloud.beforeSave("_User", function(request, response) { | |
var user = request.object; | |
if (!user.get("profilePhoto")) { | |
response.error("Users must have a profile photo."); | |
return; | |
} | |
if (!user.dirty("profilePhoto")) { |
View .gitignore
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
# Xcode | |
.DS_Store | |
build/ | |
*.pbxuser | |
!default.pbxuser | |
*.mode1v3 | |
!default.mode1v3 | |
*.mode2v3 | |
!default.mode2v3 | |
*.perspectivev3 |
View JHGradientView.swift
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
// | |
// JHGradientView.swift | |
// Gradient View editable in Interface Builder | |
// | |
// Created by JHays on 2/20/15. | |
// Copyright (c) 2015 Orbosphere. All rights reserved. | |
// | |
import Foundation | |
import UIKit |
View AppDelegate.m
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
/** | |
* Copyright (c) 2015-present, Facebook, Inc. | |
* All rights reserved. | |
* | |
* This source code is licensed under the BSD-style license found in the | |
* LICENSE file in the root directory of this source tree. An additional grant | |
* of patent rights can be found in the PATENTS file in the same directory. | |
*/ | |
#import "AppDelegate.h" |
View Auto-adjust popover size based on preferredSize of topViewController
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
// Conform to UINavigationControllerDelegate and then implement this: | |
// Especially if the topViewController is a RBStoryboardLink or something. | |
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated { | |
// NB: Using navigationController.preferredContentSize would be better here, but it doesn't reset properly when navigating back so we manually add on the height of the navbar instead. | |
CGSize size = viewController.preferredContentSize; | |
CGFloat navbarHeight = navigationController.navigationBar.frame.size.height; | |
<topViewController>.preferredContentSize = CGSizeMake(size.width, size.height + navbarHeight); |