2
0

Menu using UIActionSheet

This commit is contained in:
Maarten Billemont 2012-02-05 19:18:21 +01:00
parent 018a544cfe
commit 9b961ecac1
7 changed files with 86 additions and 243 deletions

2
External/Pearl vendored

@ -1 +1 @@
Subproject commit 203a779802b8aa6c330b5f8a88c6611925bd0968 Subproject commit 62421fb92c7421eea8cbf8f784d141425516396a

View File

@ -204,7 +204,8 @@
DA84819514CB521E00A2FA22 /* tip_location_teal.png in Resources */ = {isa = PBXBuildFile; fileRef = DA84817714CB521E00A2FA22 /* tip_location_teal.png */; }; DA84819514CB521E00A2FA22 /* tip_location_teal.png in Resources */ = {isa = PBXBuildFile; fileRef = DA84817714CB521E00A2FA22 /* tip_location_teal.png */; };
DA84819614CB521E00A2FA22 /* tip_location_wood.png in Resources */ = {isa = PBXBuildFile; fileRef = DA84817814CB521E00A2FA22 /* tip_location_wood.png */; }; DA84819614CB521E00A2FA22 /* tip_location_wood.png in Resources */ = {isa = PBXBuildFile; fileRef = DA84817814CB521E00A2FA22 /* tip_location_wood.png */; };
DA8E8E4614DD7C1D0044257E /* logo-bare.png in Resources */ = {isa = PBXBuildFile; fileRef = DA8E8E4514DD7C1D0044257E /* logo-bare.png */; }; DA8E8E4614DD7C1D0044257E /* logo-bare.png in Resources */ = {isa = PBXBuildFile; fileRef = DA8E8E4514DD7C1D0044257E /* logo-bare.png */; };
DA8E8E5114DE78C20044257E /* OPMenuViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DA8E8E5014DE78C20044257E /* OPMenuViewController.m */; }; DA8E8E5514DEB8FC0044257E /* InfoPlist.h in Headers */ = {isa = PBXBuildFile; fileRef = DA8E8E5314DEB8FC0044257E /* InfoPlist.h */; };
DA8E8E5614DEB8FC0044257E /* InfoPlist.m in Sources */ = {isa = PBXBuildFile; fileRef = DA8E8E5414DEB8FC0044257E /* InfoPlist.m */; };
DAA3B68E14CCCEE700F35AF6 /* icon_addressbook-person@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DAA3B53814CCCEE700F35AF6 /* icon_addressbook-person@2x.png */; }; DAA3B68E14CCCEE700F35AF6 /* icon_addressbook-person@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DAA3B53814CCCEE700F35AF6 /* icon_addressbook-person@2x.png */; };
DAA3B68F14CCCEE700F35AF6 /* icon_addressbook.png in Resources */ = {isa = PBXBuildFile; fileRef = DAA3B53914CCCEE700F35AF6 /* icon_addressbook.png */; }; DAA3B68F14CCCEE700F35AF6 /* icon_addressbook.png in Resources */ = {isa = PBXBuildFile; fileRef = DAA3B53914CCCEE700F35AF6 /* icon_addressbook.png */; };
DAA3B69014CCCEE700F35AF6 /* icon_addressbook@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DAA3B53A14CCCEE700F35AF6 /* icon_addressbook@2x.png */; }; DAA3B69014CCCEE700F35AF6 /* icon_addressbook@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DAA3B53A14CCCEE700F35AF6 /* icon_addressbook@2x.png */; };
@ -908,8 +909,8 @@
DA84817814CB521E00A2FA22 /* tip_location_wood.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = tip_location_wood.png; sourceTree = "<group>"; }; DA84817814CB521E00A2FA22 /* tip_location_wood.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = tip_location_wood.png; sourceTree = "<group>"; };
DA8E8E4514DD7C1D0044257E /* logo-bare.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "logo-bare.png"; path = "Resources/logo-bare.png"; sourceTree = "<group>"; }; DA8E8E4514DD7C1D0044257E /* logo-bare.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "logo-bare.png"; path = "Resources/logo-bare.png"; sourceTree = "<group>"; };
DA8E8E4714DDA62D0044257E /* MasterPassword.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = MasterPassword.entitlements; sourceTree = "<group>"; }; DA8E8E4714DDA62D0044257E /* MasterPassword.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = MasterPassword.entitlements; sourceTree = "<group>"; };
DA8E8E4F14DE78C20044257E /* OPMenuViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OPMenuViewController.h; sourceTree = "<group>"; }; DA8E8E5314DEB8FC0044257E /* InfoPlist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InfoPlist.h; sourceTree = "<group>"; };
DA8E8E5014DE78C20044257E /* OPMenuViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OPMenuViewController.m; sourceTree = "<group>"; }; DA8E8E5414DEB8FC0044257E /* InfoPlist.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InfoPlist.m; sourceTree = "<group>"; };
DAA3B53814CCCEE700F35AF6 /* icon_addressbook-person@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_addressbook-person@2x.png"; sourceTree = "<group>"; }; DAA3B53814CCCEE700F35AF6 /* icon_addressbook-person@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_addressbook-person@2x.png"; sourceTree = "<group>"; };
DAA3B53914CCCEE700F35AF6 /* icon_addressbook.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_addressbook.png; sourceTree = "<group>"; }; DAA3B53914CCCEE700F35AF6 /* icon_addressbook.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_addressbook.png; sourceTree = "<group>"; };
DAA3B53A14CCCEE700F35AF6 /* icon_addressbook@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_addressbook@2x.png"; sourceTree = "<group>"; }; DAA3B53A14CCCEE700F35AF6 /* icon_addressbook@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_addressbook@2x.png"; sourceTree = "<group>"; };
@ -1828,8 +1829,6 @@
DAE2C646148247E500BA6B10 /* OPTypeViewController.m */, DAE2C646148247E500BA6B10 /* OPTypeViewController.m */,
DA55B29C14B38272001131B7 /* OPContentViewController.h */, DA55B29C14B38272001131B7 /* OPContentViewController.h */,
DA55B29D14B38272001131B7 /* OPContentViewController.m */, DA55B29D14B38272001131B7 /* OPContentViewController.m */,
DA8E8E4F14DE78C20044257E /* OPMenuViewController.h */,
DA8E8E5014DE78C20044257E /* OPMenuViewController.m */,
DA34DA1414B1BEA100F721C1 /* OPTypes.h */, DA34DA1414B1BEA100F721C1 /* OPTypes.h */,
DA34DA1514B1BEA100F721C1 /* OPTypes.m */, DA34DA1514B1BEA100F721C1 /* OPTypes.m */,
DA007F5014B24DCC00251337 /* OPConfig.h */, DA007F5014B24DCC00251337 /* OPConfig.h */,
@ -2055,6 +2054,8 @@
DAC77CD91482AAD600BCF976 /* StringUtils.m */, DAC77CD91482AAD600BCF976 /* StringUtils.m */,
DAC77CDA1482AAD600BCF976 /* WebUtils.h */, DAC77CDA1482AAD600BCF976 /* WebUtils.h */,
DAC77CDB1482AAD600BCF976 /* WebUtils.m */, DAC77CDB1482AAD600BCF976 /* WebUtils.m */,
DA8E8E5314DEB8FC0044257E /* InfoPlist.h */,
DA8E8E5414DEB8FC0044257E /* InfoPlist.m */,
); );
name = Pearl; name = Pearl;
path = External/Pearl/Pearl; path = External/Pearl/Pearl;
@ -2327,6 +2328,7 @@
DAC781301482AAD800BCF976 /* ValidatingTextField.h in Headers */, DAC781301482AAD800BCF976 /* ValidatingTextField.h in Headers */,
DAC781321482AAD800BCF976 /* WebViewController.h in Headers */, DAC781321482AAD800BCF976 /* WebViewController.h in Headers */,
DA84808414CB3DBA00A2FA22 /* MessageView.h in Headers */, DA84808414CB3DBA00A2FA22 /* MessageView.h in Headers */,
DA8E8E5514DEB8FC0044257E /* InfoPlist.h in Headers */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -3045,7 +3047,6 @@
DA0A848C14C4DFCB0090EA8E /* OPElementGeneratedEntity.m in Sources */, DA0A848C14C4DFCB0090EA8E /* OPElementGeneratedEntity.m in Sources */,
DAA3B81414CDC77100F35AF6 /* jquery-1.6.1.min.js in Sources */, DAA3B81414CDC77100F35AF6 /* jquery-1.6.1.min.js in Sources */,
DA65570614D731F000841C99 /* OPGuideViewController.m in Sources */, DA65570614D731F000841C99 /* OPGuideViewController.m in Sources */,
DA8E8E5114DE78C20044257E /* OPMenuViewController.m in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -3101,6 +3102,7 @@
DAC781311482AAD800BCF976 /* ValidatingTextField.m in Sources */, DAC781311482AAD800BCF976 /* ValidatingTextField.m in Sources */,
DAC781331482AAD800BCF976 /* WebViewController.m in Sources */, DAC781331482AAD800BCF976 /* WebViewController.m in Sources */,
DA84808514CB3DBA00A2FA22 /* MessageView.m in Sources */, DA84808514CB3DBA00A2FA22 /* MessageView.m in Sources */,
DA8E8E5614DEB8FC0044257E /* InfoPlist.m in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };

View File

@ -308,107 +308,6 @@ The passwords aren't saved anywhere. This is a major advantage: if you loose yo
</objects> </objects>
<point key="canvasLocation" x="996" y="182"/> <point key="canvasLocation" x="996" y="182"/>
</scene> </scene>
<scene sceneID="CAy-bQ-C6H">
<objects>
<placeholder placeholderIdentifier="IBFirstResponder" id="QZd-tS-GZh" userLabel="First Responder" sceneMemberID="firstResponder"/>
<tableViewController id="kOI-sP-Sdw" sceneMemberID="viewController">
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="plain" rowHeight="30" sectionHeaderHeight="22" sectionFooterHeight="22" id="M67-lE-Qs9">
<rect key="frame" x="0.0" y="0.0" width="150" height="460"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<sections>
<tableViewSection id="bkW-yw-n1W">
<cells>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" textLabel="Rwj-wk-t0i" style="IBUITableViewCellStyleDefault" id="xKQ-NU-gzm">
<rect key="frame" x="0.0" y="0.0" width="150" height="30"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="150" height="29"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" text="Help" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Rwj-wk-t0i">
<rect key="frame" x="10" y="0.0" width="130" height="29"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" textLabel="QyJ-9R-TKX" style="IBUITableViewCellStyleDefault" id="HEh-hy-Oxe">
<rect key="frame" x="0.0" y="30" width="150" height="30"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="150" height="29"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" text="FAQ" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="QyJ-9R-TKX">
<rect key="frame" x="10" y="0.0" width="130" height="29"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" textLabel="2ed-5N-kNd" style="IBUITableViewCellStyleDefault" id="jWC-3d-Lyf">
<rect key="frame" x="0.0" y="60" width="150" height="30"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="150" height="29"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" text="Quick Start" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="2ed-5N-kNd">
<rect key="frame" x="10" y="0.0" width="130" height="29"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" textLabel="CHx-Q6-JUu" style="IBUITableViewCellStyleDefault" id="FeB-b2-cca">
<rect key="frame" x="0.0" y="90" width="150" height="30"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="150" height="29"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" text="Settings" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="CHx-Q6-JUu">
<rect key="frame" x="10" y="0.0" width="130" height="29"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</tableViewCell>
</cells>
</tableViewSection>
</sections>
<connections>
<outlet property="dataSource" destination="kOI-sP-Sdw" id="vsf-0U-eMd"/>
<outlet property="delegate" destination="kOI-sP-Sdw" id="utR-L0-FDy"/>
</connections>
</tableView>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
</tableViewController>
</objects>
<point key="canvasLocation" x="996" y="785"/>
</scene>
<scene sceneID="U26-Zf-euQ"> <scene sceneID="U26-Zf-euQ">
<objects> <objects>
<placeholder placeholderIdentifier="IBFirstResponder" id="mK2-p1-3zC" userLabel="First Responder" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="mK2-p1-3zC" userLabel="First Responder" sceneMemberID="firstResponder"/>
@ -672,22 +571,10 @@ L4m3P4sSw0rD</string>
<color key="backgroundColor" red="0.14901960784313725" green="0.16470588235294117" blue="0.1803921568627451" alpha="1" colorSpace="calibratedRGB"/> <color key="backgroundColor" red="0.14901960784313725" green="0.16470588235294117" blue="0.1803921568627451" alpha="1" colorSpace="calibratedRGB"/>
</view> </view>
<navigationItem key="navigationItem" title="Master Password" id="hB9-S6-KHC"> <navigationItem key="navigationItem" title="Master Password" id="hB9-S6-KHC">
<barButtonItem key="rightBarButtonItem" id="Csu-uI-sPX"> <barButtonItem key="rightBarButtonItem" systemItem="action" id="8Y7-Bf-FHa">
<button key="customView" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="iwA-Sh-vZO">
<rect key="frame" x="283" y="6" width="32" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<state key="normal" image="icon_question.png">
<color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections> <connections>
<action selector="toggleHelp" destination="PQa-Xl-A3x" eventType="touchUpInside" id="Ufm-QL-QUM"/> <action selector="action:" destination="PQa-Xl-A3x" id="mhz-Ey-IOC"/>
</connections> </connections>
</button>
</barButtonItem> </barButtonItem>
</navigationItem> </navigationItem>
<connections> <connections>
@ -815,7 +702,6 @@ L4m3P4sSw0rD</string>
<image name="icon_cancel.png" width="32" height="32"/> <image name="icon_cancel.png" width="32" height="32"/>
<image name="icon_edit.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_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_alert_black.png" width="235" height="81"/>
<image name="tip_basic_black.png" width="210" height="60"/> <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_green_large.png" width="300" height="46"/>
@ -826,54 +712,6 @@ L4m3P4sSw0rD</string>
<image name="ui_panel_container.png" width="300" height="87"/> <image name="ui_panel_container.png" width="300" height="87"/>
<image name="ui_panel_display.png" width="300" height="86"/> <image name="ui_panel_display.png" width="300" height="86"/>
</resources> </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="menuContainer" candidateClass="UIView"/>
<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"> <simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar" statusBarStyle="blackTranslucent"/> <simulatedStatusBarMetrics key="statusBar" statusBarStyle="blackTranslucent"/>
<simulatedOrientationMetrics key="orientation"/> <simulatedOrientationMetrics key="orientation"/>

View File

@ -34,8 +34,12 @@
- (IBAction)copyContent; - (IBAction)copyContent;
- (IBAction)incrementPasswordCounter; - (IBAction)incrementPasswordCounter;
- (IBAction)editPassword; - (IBAction)editPassword;
- (IBAction)toggleHelp;
- (void)toggleHelp:(BOOL)hidden;
- (IBAction)closeAlert; - (IBAction)closeAlert;
- (IBAction)action:(UIBarButtonItem *)sender;
- (BOOL)isHelpVisible;
- (void)toggleHelpAnimated:(BOOL)animated;
- (void)setHelpHidden:(BOOL)hidden animated:(BOOL)animated;
- (void)setHelpChapter:(NSString *)chapter;
@end @end

View File

@ -71,8 +71,8 @@
self.searchTipContainer.alpha = 1; self.searchTipContainer.alpha = 1;
}]; }];
[self toggleHelp:[[OPConfig get].helpHidden boolValue]]; [self setHelpHidden:[[OPConfig get].helpHidden boolValue] animated:animated];
[self updateAnimated:NO]; [self updateAnimated:animated];
} }
- (void)viewDidAppear:(BOOL)animated { - (void)viewDidAppear:(BOOL)animated {
@ -161,14 +161,7 @@
- (void)updateWasAnimated:(BOOL)animated { - (void)updateWasAnimated:(BOOL)animated {
NSUInteger chapter = self.activeElement? 2: 1; [self setHelpChapter:self.activeElement? @"2": @"1"];
[self.helpView loadRequest:
[NSURLRequest requestWithURL:
[NSURL URLWithString:[NSString stringWithFormat:@"#%d", chapter] relativeToURL:
[[NSBundle mainBundle] URLForResource:@"help" withExtension:@"html"]]]];
[self.helpView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"setClass('%@');",
ClassNameFromOPElementType(self.activeElement.type)]];
self.siteName.text = self.activeElement.name; self.siteName.text = self.activeElement.name;
self.passwordCounter.alpha = self.activeElement.type & OPElementTypeClassCalculated? 0.5f: 0; self.passwordCounter.alpha = self.activeElement.type & OPElementTypeClassCalculated? 0.5f: 0;
@ -193,6 +186,42 @@
}); });
} }
- (BOOL)isHelpVisible {
return self.helpContainer.frame.origin.y < 400;
}
- (void)toggleHelpAnimated:(BOOL)animated {
[self setHelpHidden:[self isHelpVisible] animated:animated];
}
- (void)setHelpHidden:(BOOL)hidden animated:(BOOL)animated {
[UIView animateWithDuration:animated? 0.3f: 0 animations:^{
if (hidden) {
self.contentContainer.frame = CGRectSetHeight(self.contentContainer.frame, 373);
self.helpContainer.frame = CGRectSetY(self.helpContainer.frame, 415);
[OPConfig get].helpHidden = [NSNumber numberWithBool:YES];
} else {
self.contentContainer.frame = CGRectSetHeight(self.contentContainer.frame, 175);
self.helpContainer.frame = CGRectSetY(self.helpContainer.frame, 216);
[OPConfig get].helpHidden = [NSNumber numberWithBool:NO];
}
}];
}
- (void)setHelpChapter:(NSString *)chapter {
[self.helpView loadRequest:
[NSURLRequest requestWithURL:
[NSURL URLWithString:[NSString stringWithFormat:@"#%@", chapter] relativeToURL:
[[NSBundle mainBundle] URLForResource:@"help" withExtension:@"html"]]]];
[self.helpView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"setClass('%@');",
ClassNameFromOPElementType(self.activeElement.type)]];
}
- (void)showContentTip:(NSString *)message withIcon:(UIImageView *)icon { - (void)showContentTip:(NSString *)message withIcon:(UIImageView *)icon {
self.contentTipBody.text = message; self.contentTipBody.text = message;
@ -280,29 +309,6 @@
} }
} }
- (IBAction)toggleHelp {
[UIView animateWithDuration:0.3f animations:^{
if (self.helpContainer.frame.origin.y < 400)
[self toggleHelp:YES];
else
[self toggleHelp:NO];
}];
}
- (void)toggleHelp:(BOOL)hidden {
if (hidden) {
self.contentContainer.frame = CGRectSetHeight(self.contentContainer.frame, 373);
self.helpContainer.frame = CGRectSetY(self.helpContainer.frame, 415);
[OPConfig get].helpHidden = [NSNumber numberWithBool:YES];
} else {
self.contentContainer.frame = CGRectSetHeight(self.contentContainer.frame, 175);
self.helpContainer.frame = CGRectSetY(self.helpContainer.frame, 216);
[OPConfig get].helpHidden = [NSNumber numberWithBool:NO];
}
}
- (IBAction)closeAlert { - (IBAction)closeAlert {
[UIView animateWithDuration:0.3f animations:^{ [UIView animateWithDuration:0.3f animations:^{
@ -312,6 +318,34 @@
}]; }];
} }
- (IBAction)action:(id)sender {
[SheetViewController showSheetWithTitle:nil message:nil viewStyle:UIActionSheetStyleAutomatic
tappedButtonBlock:^(UIActionSheet *sheet, NSInteger buttonIndex) {
if (buttonIndex == [sheet cancelButtonIndex])
return;
switch (buttonIndex - [sheet firstOtherButtonIndex]) {
case 0:
[self toggleHelpAnimated:YES];
break;
case 1:
[self setHelpChapter:@"faq"];
[self setHelpHidden:NO animated:YES];
break;
case 2:
[[OPAppDelegate get] showGuide];
break;
case 3:
[[UIApplication sharedApplication] openURL:
[NSURL URLWithString:[NSString stringWithFormat:@"prefs:root=Apps&path=%@",
[InfoPlist get].CFBundleDisplayName]]];
break;
}
} cancelTitle:[PearlStrings get].commonButtonCancel destructiveTitle:nil
otherTitles:[self isHelpVisible]? @"Hide Help": @"Show Help", @"FAQ", @"Quick Start", @"Settings", nil];
}
- (void)didSelectType:(OPElementType)type { - (void)didSelectType:(OPElementType)type {
[self updateElement:^{ [self updateElement:^{

View File

@ -1,13 +0,0 @@
//
// OPMenuViewController.h
// MasterPassword
//
// Created by Maarten Billemont on 05/02/12.
// Copyright (c) 2012 Lyndir. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface OPMenuViewController : UITableViewController
@end

View File

@ -1,22 +0,0 @@
//
// OPMenuViewController.m
// MasterPassword
//
// Created by Maarten Billemont on 05/02/12.
// Copyright (c) 2012 Lyndir. All rights reserved.
//
#import "OPMenuViewController.h"
@implementation OPMenuViewController
#pragma mark - Table view delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.row == 4)
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=Apps&path=MasterPassword"]];
}
@end