View gist:1f1e5ae1d4b98468aa7947d66297f28c
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
/** | |
* Sample React Native App | |
* https://github.com/facebook/react-native | |
* @flow | |
*/ | |
import React, { Component } from 'react'; | |
import { | |
AppRegistry, | |
StyleSheet, |
View gist:d59b940df8055068ad9a0278fdaf859e
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 React, { Component } from 'react'; | |
import { | |
View, | |
PanResponder, | |
Animated, | |
} from 'react-native'; | |
class Draggable extends Component { | |
constructor(props){ |
View gist:60bcf2f97e8eced0381bc7ab9208ee7f
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
// | |
// PathView.swift | |
// | |
// Created by Alex Gibson on 7/23/17. | |
// Copyright © 2017 AG. All rights reserved. | |
// | |
import UIKit | |
@IBDesignable |
View CAAnimations
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]; | |
// Do any additional setup after loading the view, typically from a nib. | |
[self longAnimation]; | |
} | |
View CutOutBluredText
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 | |
import CoreMotion | |
@IBDesignable | |
class CutOutBluredText: UIView { | |
@IBInspectable var backgroundImage : UIImage? = nil{ | |
didSet{ | |
setUp() | |
} |
View gist:adc79b6f06d2fc92a93a9cc75ca5ec68
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
//In the controllers to not rotate | |
override var shouldAutorotate : Bool { | |
return false | |
} | |
override var supportedInterfaceOrientations : UIInterfaceOrientationMask { | |
return UIInterfaceOrientationMask.portrait | |
} | |
//otherwise i did not change anything. and as long as all orientations are supported if you don't set above it will rotate. | |
// on dismiss i think it reoriented but i might have ask for layout or something cannot remember. |
View Change image at the 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
CATransaction.begin() | |
let animation = CABasicAnimation(keyPath: "position") | |
animation.toValue = NSValue(cgPoint: CGPoint(x: self.view.bounds.width - 100, y: self.view.bounds.height - 100)) | |
animation.fromValue = NSValue(cgPoint: position) | |
animation.duration = 5 | |
animation.isRemovedOnCompletion = false | |
animation.fillMode = kCAFillModeForwards | |
CATransaction.setCompletionBlock({ | |
self.airplane.layer.position = CGPoint(x: self.view.bounds.width - 100, y: self.view.bounds.height - 100) |
View PulseTouchCollectionViewCell
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 | |
@IBDesignable class PulseTouchCollectionViewCell: UICollectionViewCell { | |
@IBInspectable var scaleFactor : CGFloat = 1.3 | |
@IBInspectable var animationColor : UIColor = UIColor.green | |
@IBInspectable var startingOpacity : Float = 0.2 | |
@IBInspectable var animationDuration : Double = 0.8 | |
View Help
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 "SettingsViewController.h" | |
#import "HomeViewController.h" | |
#import "AppDelegate.h" | |
#import "Location+CoreDataClass.h" | |
#import "LocationManager.h" | |
#import "DarkSkyAPI.h" | |
@interface SettingsViewController ()<UISearchBarDelegate> |
View gist:87a44defc2f8e9088aa2970fecd7e8e9
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
call in viewDidLoad | |
setUpNavBar(bottomBorderColor: .white, opacity: 0.4, height: 1) | |
func setUpNavBar(bottomBorderColor:UIColor,opacity:Float,height:CGFloat){ | |
self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default) | |
let navLabel = UILabel(frame: CGRect.zero) | |
navLabel.backgroundColor = UIColor.clear | |
navLabel.font = UIFont.systemFont(ofSize: 18) | |
navLabel.textAlignment = NSTextAlignment.center |
NewerOlder