Skip to content

Instantly share code, notes, and snippets.

//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.
@agibson73
agibson73 / CutOutBluredText
Last active June 13, 2017 20:04
Animated Text CGPath with an image background
import UIKit
import CoreMotion
@IBDesignable
class CutOutBluredText: UIView {
@IBInspectable var backgroundImage : UIImage? = nil{
didSet{
setUp()
}
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
[self longAnimation];
}
//
// PathView.swift
//
// Created by Alex Gibson on 7/23/17.
// Copyright © 2017 AG. All rights reserved.
//
import UIKit
@IBDesignable
import React, { Component } from 'react';
import {
View,
PanResponder,
Animated,
} from 'react-native';
class Draggable extends Component {
constructor(props){
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,