2
0

Added a quick-start guide.

This commit is contained in:
Maarten Billemont
2012-02-02 14:56:09 +01:00
parent b10c00786e
commit f7f9ae99ca
21 changed files with 264 additions and 26 deletions

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="1.0" toolsVersion="1938" systemVersion="11C74" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="KZF-fe-y9n">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="1.0" toolsVersion="1938" systemVersion="11D50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="KZF-fe-y9n">
<dependencies>
<development defaultVersion="4200" identifier="xcode"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="933"/>
@@ -616,26 +616,66 @@ L4m3P4sSw0rD</string>
<scene sceneID="Rt1-b4-sUB">
<objects>
<placeholder placeholderIdentifier="IBFirstResponder" id="7yf-G7-kVy" userLabel="First Responder" sceneMemberID="firstResponder"/>
<viewController id="qz3-eG-aEi" sceneMemberID="viewController">
<viewController id="qz3-eG-aEi" customClass="OPGuideViewController" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="cwa-ct-2DY">
<rect key="frame" x="0.0" y="20" width="320" height="460"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="bottom" image="app.png" id="vz0-cw-aVL">
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" pagingEnabled="YES" showsVerticalScrollIndicator="NO" id="Nr4-hi-8b2">
<rect key="frame" x="0.0" y="0.0" width="320" height="460"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
</imageView>
<view alpha="0.80000000000000004" contentMode="scaleToFill" id="XR2-Mq-TMD">
<rect key="frame" x="0.0" y="0.0" width="320" height="460"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" cocoaTouchSystemColor="viewFlipsideBackgroundColor"/>
</view>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="bottom" image="guide_page_1.png" id="eJP-cS-VRU">
<rect key="frame" x="0.0" y="0.0" width="320" height="460"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="bottom" image="guide_page_2.png" id="1J9-z9-h96">
<rect key="frame" x="320" y="0.0" width="320" height="460"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="bottom" image="guide_page_3.png" id="8kf-Wm-F3L">
<rect key="frame" x="640" y="0.0" width="320" height="460"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="bottom" image="guide_page_4.png" id="H5W-P4-o7O">
<rect key="frame" x="960" y="0.0" width="320" height="460"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="bottom" image="guide_page_5.png" id="IXz-T9-Umi">
<rect key="frame" x="1280" y="0.0" width="320" height="460"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="bottom" image="guide_page_6.png" id="Hd0-Or-naq">
<rect key="frame" x="1280" y="0.0" width="320" height="460"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" reversesTitleShadowWhenHighlighted="YES" lineBreakMode="middleTruncation" id="q93-J1-auj">
<rect key="frame" x="1290" y="394" width="300" height="46"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<size key="titleShadowOffset" width="0.0" height="1"/>
<state key="normal" title="Get started" backgroundImage="ui_button_green_large.png">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="titleShadowColor" red="0.194560533886145" green="0.30086678832116787" blue="0.1263640535337863" alpha="1" colorSpace="deviceRGB"/>
</state>
<state key="highlighted">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="close" destination="qz3-eG-aEi" eventType="touchUpInside" id="uYR-EJ-U6H"/>
</connections>
</button>
</subviews>
</scrollView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<color key="backgroundColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
</view>
<connections>
<outlet property="scrollView" destination="Nr4-hi-8b2" id="8QD-sv-vu6"/>
</connections>
</viewController>
</objects>
<point key="canvasLocation" x="455" y="793"/>
<point key="canvasLocation" x="455" y="785"/>
</scene>
<scene sceneID="8r0-wA-Zre">
<objects>
@@ -650,22 +690,29 @@ L4m3P4sSw0rD</string>
<nil name="viewControllers"/>
<connections>
<segue destination="PQa-Xl-A3x" kind="relationship" relationship="rootViewController" id="LUg-eF-JQd"/>
<segue destination="qz3-eG-aEi" kind="modal" identifier="OP_Guide" id="vyG-wN-8hU"/>
</connections>
</navigationController>
</objects>
<point key="canvasLocation" x="-51" y="182"/>
<point key="canvasLocation" x="-85" y="182"/>
</scene>
</scenes>
<resources>
<image name="Content-Backdrop.png" width="480" height="480"/>
<image name="Square-bottom.png" width="551" height="58"/>
<image name="app.png" width="320" height="480"/>
<image name="guide_page_1.png" width="320" height="480"/>
<image name="guide_page_2.png" width="320" height="480"/>
<image name="guide_page_3.png" width="320" height="480"/>
<image name="guide_page_4.png" width="320" height="480"/>
<image name="guide_page_5.png" width="320" height="480"/>
<image name="guide_page_6.png" width="320" height="480"/>
<image name="icon_cancel.png" width="32" height="32"/>
<image name="icon_edit.png" width="32" height="32"/>
<image name="icon_plus.png" width="32" height="32"/>
<image name="icon_question.png" width="32" height="32"/>
<image name="tip_alert_black.png" width="235" height="81"/>
<image name="tip_basic_black.png" width="210" height="60"/>
<image name="ui_button_green_large.png" width="300" height="46"/>
<image name="ui_button_standard_large.png" width="300" height="46"/>
<image name="ui_list_first.png" width="300" height="35"/>
<image name="ui_list_last.png" width="300" height="35"/>
@@ -673,6 +720,53 @@ L4m3P4sSw0rD</string>
<image name="ui_panel_container.png" width="300" height="87"/>
<image name="ui_panel_display.png" width="300" height="86"/>
</resources>
<classes>
<class className="OPGuideViewController" superclassName="UIViewController">
<source key="sourceIdentifier" type="project" relativePath="./Classes/OPGuideViewController.h"/>
<relationships>
<relationship kind="action" name="close"/>
<relationship kind="outlet" name="scrollView" candidateClass="UIScrollView"/>
</relationships>
</class>
<class className="OPMainViewController" superclassName="UIViewController">
<source key="sourceIdentifier" type="project" relativePath="./Classes/OPMainViewController.h"/>
<relationships>
<relationship kind="action" name="closeAlert"/>
<relationship kind="action" name="copyContent"/>
<relationship kind="action" name="editPassword"/>
<relationship kind="action" name="incrementPasswordCounter"/>
<relationship kind="action" name="toggleHelp"/>
<relationship kind="outlet" name="alertBody" candidateClass="UITextView"/>
<relationship kind="outlet" name="alertContainer" candidateClass="UIView"/>
<relationship kind="outlet" name="alertTitle" candidateClass="UILabel"/>
<relationship kind="outlet" name="contentContainer" candidateClass="UIView"/>
<relationship kind="outlet" name="contentField" candidateClass="UITextField"/>
<relationship kind="outlet" name="contentTipBody" candidateClass="UILabel"/>
<relationship kind="outlet" name="contentTipContainer" candidateClass="UIView"/>
<relationship kind="outlet" name="contentTipEditIcon" candidateClass="UIImageView"/>
<relationship kind="outlet" name="helpContainer" candidateClass="UIView"/>
<relationship kind="outlet" name="helpView" candidateClass="UIWebView"/>
<relationship kind="outlet" name="passwordCounter" candidateClass="UILabel"/>
<relationship kind="outlet" name="passwordEdit" candidateClass="UIButton"/>
<relationship kind="outlet" name="passwordIncrementer" candidateClass="UIButton"/>
<relationship kind="outlet" name="searchResultsController" candidateClass="OPSearchDelegate"/>
<relationship kind="outlet" name="searchTipContainer" candidateClass="UIView"/>
<relationship kind="outlet" name="siteName" candidateClass="UILabel"/>
<relationship kind="outlet" name="typeButton" candidateClass="UIButton"/>
</relationships>
</class>
<class className="OPSearchDelegate" superclassName="NSObject">
<source key="sourceIdentifier" type="project" relativePath="./Classes/OPSearchDelegate.h"/>
<relationships>
<relationship kind="outlet" name="delegate"/>
<relationship kind="outlet" name="searchDisplayController" candidateClass="UISearchDisplayController"/>
<relationship kind="outlet" name="searchTipContainer" candidateClass="UIView"/>
</relationships>
</class>
<class className="OPTypeViewController" superclassName="UITableViewController">
<source key="sourceIdentifier" type="project" relativePath="./Classes/OPTypeViewController.h"/>
</class>
</classes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar" statusBarStyle="blackTranslucent"/>
<simulatedOrientationMetrics key="orientation"/>

View File

@@ -24,4 +24,7 @@
- (void)saveContext;
- (NSURL *)applicationDocumentsDirectory;
- (void)showGuide;
- (void)loadKeyPhrase;
@end

View File

@@ -15,7 +15,6 @@
+ (NSDictionary *)keyPhraseQuery;
+ (NSDictionary *)keyPhraseHashQuery;
- (void)loadKeyPhrase;
- (void)forgetKeyPhrase;
- (void)loadStoredKeyPhrase;
- (void)askKeyPhrase;
@@ -122,7 +121,15 @@
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
[self loadKeyPhrase];
if ([[OPConfig get].firstRun boolValue])
[self showGuide];
else
[self loadKeyPhrase];
}
- (void)showGuide {
[self.navigationController performSegueWithIdentifier:@"OP_Guide" sender:self];
}
- (void)loadKeyPhrase {

View File

@@ -0,0 +1,17 @@
//
// OPGuideViewController.h
// OnePassword
//
// Created by Maarten Billemont on 30/01/12.
// Copyright (c) 2012 Lyndir. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface OPGuideViewController : UIViewController
@property (weak, nonatomic) IBOutlet UIScrollView *scrollView;
- (IBAction)close;
@end

View File

@@ -0,0 +1,45 @@
//
// OPGuideViewController.m
// OnePassword
//
// Created by Maarten Billemont on 30/01/12.
// Copyright (c) 2012 Lyndir. All rights reserved.
//
#import "OPGuideViewController.h"
#import "OPAppDelegate.h"
@implementation OPGuideViewController
@synthesize scrollView;
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
- (void)viewDidLoad {
[super viewDidLoad];
[UIUtils autoSizeContent:self.scrollView];
}
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
[[OPAppDelegate get] loadKeyPhrase];
}
- (void)viewDidUnload {
[self setScrollView:nil];
[super viewDidUnload];
}
- (IBAction)close {
[self.presentingViewController dismissModalViewControllerAnimated:YES];
}
@end

View File

@@ -64,13 +64,8 @@
[super viewWillAppear:animated];
if (![self.searchTipContainer.superview isKindOfClass:[UIWindow class]]) {
// Put the search tip on the window so it's above the nav bar.
[self.searchTipContainer removeFromSuperview];
[[UIApplication sharedApplication].keyWindow addSubview:self.searchTipContainer];
self.searchTipContainer.frame = CGRectSetY(self.searchTipContainer.frame, self.searchTipContainer.frame.origin.y
+ self.navigationController.navigationBar.frame.size.height /* Nav */ + 20 /* Status */);
}
self.searchTipContainer.hidden = NO;
if (!self.activeElement.name)
[UIView animateWithDuration:animated? 0.2f: 0 animations:^{
self.searchTipContainer.alpha = 1;
@@ -80,8 +75,22 @@
[self updateAnimated:NO];
}
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
self.searchTipContainer.hidden = YES;
}
- (void)viewDidLoad {
// Put the search tip on the window so it's above the nav bar.
// [self.searchTipContainer removeFromSuperview];
// [[UIApplication sharedApplication].keyWindow addSubview:self.searchTipContainer];
// self.searchTipContainer.frame = CGRectSetY(self.searchTipContainer.frame, self.searchTipContainer.frame.origin.y
// + self.navigationController.navigationBar.frame.size.height /* Nav */ + 20 /* Status */);
self.searchTipContainer.hidden = YES;
// Because IB's edit button doesn't auto-toggle self.editable like editButtonItem does.
self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"ui_background"]];
[[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationWillResignActiveNotification object:nil queue:[NSOperationQueue mainQueue]
@@ -368,7 +377,7 @@
[[UIApplication sharedApplication] openURL:[request URL]];
return NO;
}
return YES;
}

View File

@@ -45,7 +45,7 @@
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>©2011-2012, Lyndir</string>
<string>© 2011-2012, Lyndir</string>
<key>UIMainStoryboardFile</key>
<string>MainStoryboard_iPhone</string>
<key>UIMainStoryboardFile~ipad</key>

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 338 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 399 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 KiB