Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
10ed44d
add some constants for base colors
stakes Mar 13, 2015
dc794a6
change the color of the bonjour alert view
stakes Mar 13, 2015
c243867
update storyboard colors and fonts
stakes Mar 13, 2015
65e39be
Blue launch screen
stakes Apr 2, 2015
9e71aee
Update pods
stakes Apr 2, 2015
d53923f
Implement shake-to-refresh
stakes Apr 2, 2015
ddb42fe
Revise settings view for shake-to-refresh
stakes Apr 2, 2015
a7fe3eb
Update asset colors
stakes Apr 2, 2015
c2e712f
Colors + fonts in search bar
stakes Apr 2, 2015
6716843
Probably don't need this anymore, but update font anyway
stakes Apr 2, 2015
ed1fe77
Fonts + colors
stakes Apr 2, 2015
75fa0a9
Settings layout and fonts/colors
stakes Apr 2, 2015
98c5f2e
add frameless:// custom url scheme
stakes Apr 2, 2015
d438629
frameless:// url scheme
stakes Apr 3, 2015
645d353
invalidate loading timer on refresh
stakes Apr 4, 2015
b04f5e2
limit settings to the two control-showing actions
stakes Apr 6, 2015
52a4530
add swipe from top down to show controls
stakes Apr 6, 2015
a4ac655
fix bug on the storyboard
stakes Apr 6, 2015
c535830
update to swift 1.2
stakes Apr 17, 2015
1dbe9f9
update onboardingviewcontroller to accept attributed text
stakes Apr 18, 2015
2e50fea
group files
stakes Apr 18, 2015
0948fdf
use attributed strings and line spacing in intro
stakes Apr 18, 2015
4a602b8
adjust typography on alert view
stakes Apr 18, 2015
595afd3
framer icon
stakes Apr 19, 2015
800c8fb
stub in flag to automatically connect/skip modal for Framer
stakes Apr 19, 2015
d0ed294
add a "don't sleep" switch
stakes Apr 19, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 46 additions & 14 deletions Frameless.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,46 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
0D96CEF61AE1CAF5002B16CA /* viewcontrollers */ = {
isa = PBXGroup;
children = (
0D4915AC1A29031B0018BEC6 /* PortraitOnboardingViewController.swift */,
0DA5BB4E19FAD12800B2FDD1 /* ViewController.swift */,
0DD869F41A08A7A000BF196E /* SettingsViewController.swift */,
0DAB64411A09FDD00046287E /* SettingsTableViewController.swift */,
);
name = viewcontrollers;
sourceTree = "<group>";
};
0D96CEF71AE1CB21002B16CA /* bridging */ = {
isa = PBXGroup;
children = (
0DA5BB7319FC2E5400B2FDD1 /* Frameless-Bridging-Header.h */,
0DA5BB7719FC2EAE00B2FDD1 /* AppearanceBridge.h */,
0DA5BB7819FC2EBF00B2FDD1 /* AppearanceBridge.m */,
);
name = bridging;
sourceTree = "<group>";
};
0D96CEF81AE1CB30002B16CA /* shared */ = {
isa = PBXGroup;
children = (
0DA5BB9F19FDE2AC00B2FDD1 /* AppDefaults.swift */,
0D18E4261A2D8B1200337D91 /* FramelessSearchBar.swift */,
0DA5BB7119FC25F000B2FDD1 /* Helpers.swift */,
0D0741CC1A366F0800A6D270 /* FramerBonjour.swift */,
);
name = shared;
sourceTree = "<group>";
};
0D96CEF91AE1CB5B002B16CA /* external */ = {
isa = PBXGroup;
children = (
0DD7EC1B1A72FC0F00BED2DC /* JSSAlertView.swift */,
);
name = external;
sourceTree = "<group>";
};
0DA5BB1019FAD10F00B2FDD1 = {
isa = PBXGroup;
children = (
Expand All @@ -112,24 +152,15 @@
0DA5BB4119FAD12800B2FDD1 /* Frameless */ = {
isa = PBXGroup;
children = (
0DA5BB9E19FDE0A800B2FDD1 /* Interface Builder Files */,
0DA5BB9F19FDE2AC00B2FDD1 /* AppDefaults.swift */,
0DA5BB7119FC25F000B2FDD1 /* Helpers.swift */,
0DA5BB7319FC2E5400B2FDD1 /* Frameless-Bridging-Header.h */,
0DA5BB7719FC2EAE00B2FDD1 /* AppearanceBridge.h */,
0DA5BB7819FC2EBF00B2FDD1 /* AppearanceBridge.m */,
0DA5BB4219FAD12800B2FDD1 /* AppDelegate.swift */,
0D4915AC1A29031B0018BEC6 /* PortraitOnboardingViewController.swift */,
0DA5BB4E19FAD12800B2FDD1 /* ViewController.swift */,
0DD869F41A08A7A000BF196E /* SettingsViewController.swift */,
0DAB64411A09FDD00046287E /* SettingsTableViewController.swift */,
0DA5BB4519FAD12800B2FDD1 /* Main.storyboard */,
0D0741CC1A366F0800A6D270 /* FramerBonjour.swift */,
0D96CEF71AE1CB21002B16CA /* bridging */,
0D96CEF91AE1CB5B002B16CA /* external */,
0D96CEF81AE1CB30002B16CA /* shared */,
0D96CEF61AE1CAF5002B16CA /* viewcontrollers */,
0DA5BB9E19FDE0A800B2FDD1 /* Interface Builder Files */,
0DA5BB4919FAD12800B2FDD1 /* Images.xcassets */,
0DA5BB6219FAD36700B2FDD1 /* Supporting Files */,
0DA5BB7019FC24D900B2FDD1 /* Resources */,
0D18E4261A2D8B1200337D91 /* FramelessSearchBar.swift */,
0DD7EC1B1A72FC0F00BED2DC /* JSSAlertView.swift */,
);
path = Frameless;
sourceTree = "<group>";
Expand Down Expand Up @@ -165,6 +196,7 @@
0DA5BB9E19FDE0A800B2FDD1 /* Interface Builder Files */ = {
isa = PBXGroup;
children = (
0DA5BB4519FAD12800B2FDD1 /* Main.storyboard */,
0DA5BB9C19FC7C7000B2FDD1 /* LaunchScreen.xib */,
);
name = "Interface Builder Files";
Expand Down
8 changes: 8 additions & 0 deletions Frameless/AppDefaults.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,17 @@ enum AppDefaultKeys: String {
case IntroVersionSeen = "introVersionSeen"
case ShakeGesture = "shake"
case PanFromBottomGesture = "panFromBottom"
case PanFromTopGesture = "panFromTop"
case ForwardBackGesture = "panLeftRight"
case TripleTapGesture = "tripleTap"
case FramerBonjour = "framerConnect"
case KeepAwake = "keepAwake"
}

let FRAMER_BLUE = UIColorFromHex(0x28AFFA)
let FRAMER_GREEN = UIColorFromHex(0x7DDC16)
let FRAMER_PURPLE = UIColorFromHex(0x9178E2)
let FRAMER_CYAN = UIColorFromHex(0x2DD7AA)

let FRAMER_TEXT = UIColorFromHex(0x24262A)
let FRAMER_LIGHT_TEXT = UIColorFromHex(0xAEB2BA)
72 changes: 60 additions & 12 deletions Frameless/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,42 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
self.window!.makeKeyAndVisible()
}


UIButton.appearance().tintColor = UIColorFromHex(0x9178E2)

return true
}

// Open from custom URL scheme
func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject?) -> Bool {
if let host = url.host {
var urlstr = "http://" + host
if let port = url.port {
var portstr = port.stringValue
urlstr += ":" + portstr
}
if let path = url.path {
urlstr += url.path!
}

let vc = self.window?.rootViewController as! ViewController
vc.loadURL(urlstr, andCloseSearch: true)
return true
} else {
return false
}

}

func setUserSettingsDefaults() {
if NSUserDefaults.standardUserDefaults().objectForKey(AppDefaultKeys.ShakeGesture.rawValue) == nil {
NSUserDefaults.standardUserDefaults().setValue(true, forKey: AppDefaultKeys.ShakeGesture.rawValue)
}
if NSUserDefaults.standardUserDefaults().objectForKey(AppDefaultKeys.PanFromBottomGesture.rawValue) == nil {
NSUserDefaults.standardUserDefaults().setValue(true, forKey: AppDefaultKeys.PanFromBottomGesture.rawValue)
}
if NSUserDefaults.standardUserDefaults().objectForKey(AppDefaultKeys.PanFromTopGesture.rawValue) == nil {
NSUserDefaults.standardUserDefaults().setValue(true, forKey: AppDefaultKeys.PanFromTopGesture.rawValue)
}
if NSUserDefaults.standardUserDefaults().objectForKey(AppDefaultKeys.TripleTapGesture.rawValue) == nil {
NSUserDefaults.standardUserDefaults().setValue(true, forKey: AppDefaultKeys.TripleTapGesture.rawValue)
}
Expand All @@ -49,40 +72,65 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
if NSUserDefaults.standardUserDefaults().objectForKey(AppDefaultKeys.FramerBonjour.rawValue) == nil {
NSUserDefaults.standardUserDefaults().setValue(true, forKey: AppDefaultKeys.FramerBonjour.rawValue)
}
if NSUserDefaults.standardUserDefaults().objectForKey(AppDefaultKeys.KeepAwake.rawValue) == nil {
NSUserDefaults.standardUserDefaults().setValue(false, forKey: AppDefaultKeys.KeepAwake.rawValue)
} else {
let isIdleTimer = NSUserDefaults.standardUserDefaults().objectForKey(AppDefaultKeys.KeepAwake.rawValue) as? Bool
UIApplication.sharedApplication().idleTimerDisabled = isIdleTimer!
}
}

func createIntroViewController() -> OnboardingViewController {
let page01: OnboardingContentViewController = OnboardingContentViewController(title: nil, body: "Frameless is a chromeless,\nfull-screen web browser. Load a\npage and everything else hides", image: UIImage(named: "introimage01"), buttonText: nil) {
let paragraphStyle = NSMutableParagraphStyle()
paragraphStyle.lineSpacing = 4

let str01 = NSMutableAttributedString(string: "Framer for iOS is a full-screen\nbrowser that hides all controls")
str01.addAttribute(NSParagraphStyleAttributeName, value: paragraphStyle, range: NSMakeRange(0, str01.length))

let page01: OnboardingContentViewController = OnboardingContentViewController(title: nil, body: str01, image: UIImage(named: "introimage01"), buttonText: nil) {
}
page01.iconWidth = 158
page01.iconHeight = 258.5

let page02: OnboardingContentViewController = OnboardingContentViewController(title: nil, body: "Swipe up, tap with three fingers\nor shake the device to show\nthe browser bar and keyboard", image: UIImage(named: "introimage02"), buttonText: nil) {
let str02 = NSMutableAttributedString(string: "Swipe up, swipe down,\nor tap with three fingers to show\nthe browser bar and keyboard")
str02.addAttribute(NSParagraphStyleAttributeName, value: paragraphStyle, range: NSMakeRange(0, str02.length))
let page02: OnboardingContentViewController = OnboardingContentViewController(title: nil, body: str02, image: UIImage(named: "introimage02"), buttonText: nil) {
}
page02.iconWidth = 158
page02.iconHeight = 258.5

let page03: OnboardingContentViewController = OnboardingContentViewController(title: nil, body: "Swipe left and right to go\nforward and back in your\nsession history", image: UIImage(named: "introimage03"), buttonText: nil) {
self.introCompletion()
let str03 = NSMutableAttributedString(string: "Shake the device\nto refresh your prototype")
str03.addAttribute(NSParagraphStyleAttributeName, value: paragraphStyle, range: NSMakeRange(0, str03.length))
let page03: OnboardingContentViewController = OnboardingContentViewController(title: nil, body: str03, image: UIImage(named: "introimage03"), buttonText: nil) {
}
page03.iconWidth = 158
page03.iconHeight = 258.5

let page04: OnboardingContentViewController = OnboardingContentViewController(title: nil, body: "And disable any of the gestures\nif they get in your way", image: UIImage(named: "introimage04"), buttonText: "LET'S GO!") {
let str04 = NSMutableAttributedString(string: "Swipe left or right to go\nback or forward in your history")
str04.addAttribute(NSParagraphStyleAttributeName, value: paragraphStyle, range: NSMakeRange(0, str04.length))
let page04: OnboardingContentViewController = OnboardingContentViewController(title: nil, body: str04, image: UIImage(named: "introimage04"), buttonText: nil) {
self.introCompletion()
}
page04.iconWidth = 158
page04.iconHeight = 258.5

let bgImage = UIImage.withColor(UIColorFromHex(0x9178E2))
let str05 = NSMutableAttributedString(string: "And disable any of the gestures\nif they get in your way")
str05.addAttribute(NSParagraphStyleAttributeName, value: paragraphStyle, range: NSMakeRange(0, str05.length))
let page05: OnboardingContentViewController = OnboardingContentViewController(title: nil, body: str05, image: UIImage(named: "introimage05"), buttonText: "Done") {
self.introCompletion()
}
page05.iconWidth = 158
page05.iconHeight = 258.5

let bgImage = UIImage.withColor(FRAMER_BLUE)
let onboardingViewController = PortraitOnboardingViewController(
backgroundImage: bgImage,
contents: [page01, page02, page03, page04])
onboardingViewController.fontName = "ClearSans"
contents: [page01, page02, page03, page04, page05])
onboardingViewController.fontName = "HelveticaNeue"
onboardingViewController.bodyFontSize = 16
onboardingViewController.titleFontName = "ClearSans-Bold"
onboardingViewController.titleFontName = "HelveticaNeue-Bold"
onboardingViewController.titleFontSize = 22
onboardingViewController.buttonFontName = "ClearSans-Bold"
onboardingViewController.buttonFontName = "HelveticaNeue-Bold"
onboardingViewController.buttonFontSize = 20
onboardingViewController.topPadding = 60+(self.window!.frame.height/12)
onboardingViewController.underTitlePadding = 8
Expand All @@ -100,7 +148,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

func setupAppViewController(animated : Bool) {
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let appViewController = storyboard.instantiateViewControllerWithIdentifier("mainViewController") as UIViewController
let appViewController = storyboard.instantiateViewControllerWithIdentifier("mainViewController") as! UIViewController
if animated {
UIView.transitionWithView(self.window!, duration: 0.5, options:UIViewAnimationOptions.TransitionFlipFromBottom, animations: { () -> Void in
self.window!.rootViewController = appViewController
Expand Down
2 changes: 1 addition & 1 deletion Frameless/AppearanceBridge.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
@implementation AppearanceBridge

+ (void)setSearchBarTextInputAppearance {
[[UITextField appearanceWhenContainedIn:[UISearchBar class], nil] setFont:[UIFont fontWithName:@"ClearSans" size:14]];
[[UITextField appearanceWhenContainedIn:[UISearchBar class], nil] setFont:[UIFont fontWithName:@"HelveticaNeue" size:14]];
// [[UILabel appearanceWhenContainedIn:[UISearchBar class], nil] setTextColor:[UIColor whiteColor]];
}

Expand Down
Loading