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, |
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){ |
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 |
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]; | |
} | |
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() | |
} |
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. |
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) |
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 | |
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> |
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