furter 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +21 -0
- data/.rspec +2 -0
- data/.travis.yml +2 -0
- data/Changelog +3 -0
- data/Gemfile +3 -0
- data/LICENSE.txt +22 -0
- data/README.md +25 -0
- data/Rakefile +30 -0
- data/app/FurterApp/Frank/features/my_first.feature +12 -0
- data/app/FurterApp/Frank/features/step_definitions/launch_steps.rb +20 -0
- data/app/FurterApp/Frank/features/support/env.rb +8 -0
- data/app/FurterApp/Frank/frankify.xcconfig +6 -0
- data/app/FurterApp/Frank/libCocoaAsyncSocket.a +0 -0
- data/app/FurterApp/Frank/libCocoaAsyncSocketMac.a +0 -0
- data/app/FurterApp/Frank/libCocoaHTTPServer.a +0 -0
- data/app/FurterApp/Frank/libCocoaHTTPServerMac.a +0 -0
- data/app/FurterApp/Frank/libCocoaLumberjack.a +0 -0
- data/app/FurterApp/Frank/libCocoaLumberjackMac.a +0 -0
- data/app/FurterApp/Frank/libFrank.a +0 -0
- data/app/FurterApp/Frank/libFrankMac.a +0 -0
- data/app/FurterApp/Frank/libShelley.a +0 -0
- data/app/FurterApp/Frank/libShelleyMac.a +0 -0
- data/app/FurterApp/FurterApp.xcodeproj/project.pbxproj +807 -0
- data/app/FurterApp/FurterApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- data/app/FurterApp/FurterApp.xcodeproj/project.xcworkspace/xcuserdata/lwilson.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- data/app/FurterApp/FurterApp.xcodeproj/xcuserdata/lwilson.xcuserdatad/xcschemes/FurterApp.xcscheme +86 -0
- data/app/FurterApp/FurterApp.xcodeproj/xcuserdata/lwilson.xcuserdatad/xcschemes/xcschememanagement.plist +22 -0
- data/app/FurterApp/FurterApp/AppDelegate.h +22 -0
- data/app/FurterApp/FurterApp/AppDelegate.m +161 -0
- data/app/FurterApp/FurterApp/Default-568h@2x.png +0 -0
- data/app/FurterApp/FurterApp/Default.png +0 -0
- data/app/FurterApp/FurterApp/Default@2x.png +0 -0
- data/app/FurterApp/FurterApp/DetailViewController.h +23 -0
- data/app/FurterApp/FurterApp/DetailViewController.m +80 -0
- data/app/FurterApp/FurterApp/FurterApp-Info.plist +59 -0
- data/app/FurterApp/FurterApp/FurterApp-Prefix.pch +15 -0
- data/app/FurterApp/FurterApp/FurterApp.xcdatamodeld/.xccurrentversion +8 -0
- data/app/FurterApp/FurterApp/FurterApp.xcdatamodeld/FurterApp.xcdatamodel/contents +9 -0
- data/app/FurterApp/FurterApp/MasterViewController.h +22 -0
- data/app/FurterApp/FurterApp/MasterViewController.m +235 -0
- data/app/FurterApp/FurterApp/en.lproj/InfoPlist.strings +2 -0
- data/app/FurterApp/FurterApp/en.lproj/MainStoryboard_iPad.storyboard +260 -0
- data/app/FurterApp/FurterApp/en.lproj/MainStoryboard_iPhone.storyboard +129 -0
- data/app/FurterApp/FurterApp/main.m +18 -0
- data/cucumber.yml +2 -0
- data/features/button.feature +12 -0
- data/features/label.feature +10 -0
- data/features/navigation.feature +5 -0
- data/features/step_definitions/button_steps.rb +7 -0
- data/features/step_definitions/label_steps.rb +8 -0
- data/features/step_definitions/navigation_steps.rb +7 -0
- data/features/step_definitions/switches_steps.rb +12 -0
- data/features/step_definitions/text_steps.rb +25 -0
- data/features/support/core_ext/string.rb +9 -0
- data/features/support/env.rb +25 -0
- data/features/support/hooks.rb +3 -0
- data/features/support/screens/detail.rb +15 -0
- data/features/support/screens/elsewhere_page.rb +7 -0
- data/features/switches.feature +7 -0
- data/features/text.feature +15 -0
- data/furter.gemspec +26 -0
- data/lib/furter.rb +53 -0
- data/lib/furter/accessors.rb +87 -0
- data/lib/furter/accessors/alert_button.rb +18 -0
- data/lib/furter/accessors/button.rb +17 -0
- data/lib/furter/accessors/label.rb +13 -0
- data/lib/furter/accessors/map_pin.rb +18 -0
- data/lib/furter/accessors/switch.rb +20 -0
- data/lib/furter/accessors/table.rb +15 -0
- data/lib/furter/accessors/table_item.rb +10 -0
- data/lib/furter/accessors/text.rb +27 -0
- data/lib/furter/accessors/view.rb +46 -0
- data/lib/furter/navigation.rb +25 -0
- data/lib/furter/version.rb +3 -0
- data/spec/lib/furter/accessors/button_spec.rb +23 -0
- data/spec/lib/furter/accessors/label_spec.rb +24 -0
- data/spec/lib/furter/accessors/switch_spec.rb +28 -0
- data/spec/lib/furter/accessors/text_spec.rb +39 -0
- data/spec/lib/furter/accessors/view_spec.rb +43 -0
- data/spec/lib/furter/accessors_spec.rb +116 -0
- data/spec/spec_helper.rb +18 -0
- metadata +234 -0
Binary file
|
data/app/FurterApp/FurterApp.xcodeproj/xcuserdata/lwilson.xcuserdatad/xcschemes/FurterApp.xcscheme
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<Scheme
|
3
|
+
LastUpgradeVersion = "0460"
|
4
|
+
version = "1.3">
|
5
|
+
<BuildAction
|
6
|
+
parallelizeBuildables = "YES"
|
7
|
+
buildImplicitDependencies = "YES">
|
8
|
+
<BuildActionEntries>
|
9
|
+
<BuildActionEntry
|
10
|
+
buildForTesting = "YES"
|
11
|
+
buildForRunning = "YES"
|
12
|
+
buildForProfiling = "YES"
|
13
|
+
buildForArchiving = "YES"
|
14
|
+
buildForAnalyzing = "YES">
|
15
|
+
<BuildableReference
|
16
|
+
BuildableIdentifier = "primary"
|
17
|
+
BlueprintIdentifier = "124F2A7916FAAADC00865092"
|
18
|
+
BuildableName = "FurterApp.app"
|
19
|
+
BlueprintName = "FurterApp"
|
20
|
+
ReferencedContainer = "container:FurterApp.xcodeproj">
|
21
|
+
</BuildableReference>
|
22
|
+
</BuildActionEntry>
|
23
|
+
</BuildActionEntries>
|
24
|
+
</BuildAction>
|
25
|
+
<TestAction
|
26
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
27
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
28
|
+
shouldUseLaunchSchemeArgsEnv = "YES"
|
29
|
+
buildConfiguration = "Debug">
|
30
|
+
<Testables>
|
31
|
+
</Testables>
|
32
|
+
<MacroExpansion>
|
33
|
+
<BuildableReference
|
34
|
+
BuildableIdentifier = "primary"
|
35
|
+
BlueprintIdentifier = "124F2A7916FAAADC00865092"
|
36
|
+
BuildableName = "FurterApp.app"
|
37
|
+
BlueprintName = "FurterApp"
|
38
|
+
ReferencedContainer = "container:FurterApp.xcodeproj">
|
39
|
+
</BuildableReference>
|
40
|
+
</MacroExpansion>
|
41
|
+
</TestAction>
|
42
|
+
<LaunchAction
|
43
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
44
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
45
|
+
launchStyle = "0"
|
46
|
+
useCustomWorkingDirectory = "NO"
|
47
|
+
buildConfiguration = "Debug"
|
48
|
+
ignoresPersistentStateOnLaunch = "NO"
|
49
|
+
debugDocumentVersioning = "YES"
|
50
|
+
allowLocationSimulation = "YES">
|
51
|
+
<BuildableProductRunnable>
|
52
|
+
<BuildableReference
|
53
|
+
BuildableIdentifier = "primary"
|
54
|
+
BlueprintIdentifier = "124F2A7916FAAADC00865092"
|
55
|
+
BuildableName = "FurterApp.app"
|
56
|
+
BlueprintName = "FurterApp"
|
57
|
+
ReferencedContainer = "container:FurterApp.xcodeproj">
|
58
|
+
</BuildableReference>
|
59
|
+
</BuildableProductRunnable>
|
60
|
+
<AdditionalOptions>
|
61
|
+
</AdditionalOptions>
|
62
|
+
</LaunchAction>
|
63
|
+
<ProfileAction
|
64
|
+
shouldUseLaunchSchemeArgsEnv = "YES"
|
65
|
+
savedToolIdentifier = ""
|
66
|
+
useCustomWorkingDirectory = "NO"
|
67
|
+
buildConfiguration = "Release"
|
68
|
+
debugDocumentVersioning = "YES">
|
69
|
+
<BuildableProductRunnable>
|
70
|
+
<BuildableReference
|
71
|
+
BuildableIdentifier = "primary"
|
72
|
+
BlueprintIdentifier = "124F2A7916FAAADC00865092"
|
73
|
+
BuildableName = "FurterApp.app"
|
74
|
+
BlueprintName = "FurterApp"
|
75
|
+
ReferencedContainer = "container:FurterApp.xcodeproj">
|
76
|
+
</BuildableReference>
|
77
|
+
</BuildableProductRunnable>
|
78
|
+
</ProfileAction>
|
79
|
+
<AnalyzeAction
|
80
|
+
buildConfiguration = "Debug">
|
81
|
+
</AnalyzeAction>
|
82
|
+
<ArchiveAction
|
83
|
+
buildConfiguration = "Release"
|
84
|
+
revealArchiveInOrganizer = "YES">
|
85
|
+
</ArchiveAction>
|
86
|
+
</Scheme>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
+
<plist version="1.0">
|
4
|
+
<dict>
|
5
|
+
<key>SchemeUserState</key>
|
6
|
+
<dict>
|
7
|
+
<key>FurterApp.xcscheme</key>
|
8
|
+
<dict>
|
9
|
+
<key>orderHint</key>
|
10
|
+
<integer>0</integer>
|
11
|
+
</dict>
|
12
|
+
</dict>
|
13
|
+
<key>SuppressBuildableAutocreation</key>
|
14
|
+
<dict>
|
15
|
+
<key>124F2A7916FAAADC00865092</key>
|
16
|
+
<dict>
|
17
|
+
<key>primary</key>
|
18
|
+
<true/>
|
19
|
+
</dict>
|
20
|
+
</dict>
|
21
|
+
</dict>
|
22
|
+
</plist>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
//
|
2
|
+
// AppDelegate.h
|
3
|
+
// FurterApp
|
4
|
+
//
|
5
|
+
// Created by Levi Wilson on 3/20/13.
|
6
|
+
// Copyright (c) 2013 Levi Wilson. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import <UIKit/UIKit.h>
|
10
|
+
|
11
|
+
@interface AppDelegate : UIResponder <UIApplicationDelegate>
|
12
|
+
|
13
|
+
@property (strong, nonatomic) UIWindow *window;
|
14
|
+
|
15
|
+
@property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext;
|
16
|
+
@property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel;
|
17
|
+
@property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator;
|
18
|
+
|
19
|
+
- (void)saveContext;
|
20
|
+
- (NSURL *)applicationDocumentsDirectory;
|
21
|
+
|
22
|
+
@end
|
@@ -0,0 +1,161 @@
|
|
1
|
+
//
|
2
|
+
// AppDelegate.m
|
3
|
+
// FurterApp
|
4
|
+
//
|
5
|
+
// Created by Levi Wilson on 3/20/13.
|
6
|
+
// Copyright (c) 2013 Levi Wilson. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import "AppDelegate.h"
|
10
|
+
|
11
|
+
#import "MasterViewController.h"
|
12
|
+
|
13
|
+
@implementation AppDelegate
|
14
|
+
|
15
|
+
@synthesize managedObjectContext = _managedObjectContext;
|
16
|
+
@synthesize managedObjectModel = _managedObjectModel;
|
17
|
+
@synthesize persistentStoreCoordinator = _persistentStoreCoordinator;
|
18
|
+
|
19
|
+
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
20
|
+
{
|
21
|
+
// Override point for customization after application launch.
|
22
|
+
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
|
23
|
+
UISplitViewController *splitViewController = (UISplitViewController *)self.window.rootViewController;
|
24
|
+
UINavigationController *navigationController = [splitViewController.viewControllers lastObject];
|
25
|
+
splitViewController.delegate = (id)navigationController.topViewController;
|
26
|
+
|
27
|
+
UINavigationController *masterNavigationController = splitViewController.viewControllers[0];
|
28
|
+
MasterViewController *controller = (MasterViewController *)masterNavigationController.topViewController;
|
29
|
+
controller.managedObjectContext = self.managedObjectContext;
|
30
|
+
} else {
|
31
|
+
UINavigationController *navigationController = (UINavigationController *)self.window.rootViewController;
|
32
|
+
MasterViewController *controller = (MasterViewController *)navigationController.topViewController;
|
33
|
+
controller.managedObjectContext = self.managedObjectContext;
|
34
|
+
}
|
35
|
+
return YES;
|
36
|
+
}
|
37
|
+
|
38
|
+
- (void)applicationWillResignActive:(UIApplication *)application
|
39
|
+
{
|
40
|
+
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
41
|
+
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
|
42
|
+
}
|
43
|
+
|
44
|
+
- (void)applicationDidEnterBackground:(UIApplication *)application
|
45
|
+
{
|
46
|
+
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
|
47
|
+
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
|
48
|
+
}
|
49
|
+
|
50
|
+
- (void)applicationWillEnterForeground:(UIApplication *)application
|
51
|
+
{
|
52
|
+
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
|
53
|
+
}
|
54
|
+
|
55
|
+
- (void)applicationDidBecomeActive:(UIApplication *)application
|
56
|
+
{
|
57
|
+
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
58
|
+
}
|
59
|
+
|
60
|
+
- (void)applicationWillTerminate:(UIApplication *)application
|
61
|
+
{
|
62
|
+
// Saves changes in the application's managed object context before the application terminates.
|
63
|
+
[self saveContext];
|
64
|
+
}
|
65
|
+
|
66
|
+
- (void)saveContext
|
67
|
+
{
|
68
|
+
NSError *error = nil;
|
69
|
+
NSManagedObjectContext *managedObjectContext = self.managedObjectContext;
|
70
|
+
if (managedObjectContext != nil) {
|
71
|
+
if ([managedObjectContext hasChanges] && ![managedObjectContext save:&error]) {
|
72
|
+
// Replace this implementation with code to handle the error appropriately.
|
73
|
+
// abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
|
74
|
+
NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
|
75
|
+
abort();
|
76
|
+
}
|
77
|
+
}
|
78
|
+
}
|
79
|
+
|
80
|
+
#pragma mark - Core Data stack
|
81
|
+
|
82
|
+
// Returns the managed object context for the application.
|
83
|
+
// If the context doesn't already exist, it is created and bound to the persistent store coordinator for the application.
|
84
|
+
- (NSManagedObjectContext *)managedObjectContext
|
85
|
+
{
|
86
|
+
if (_managedObjectContext != nil) {
|
87
|
+
return _managedObjectContext;
|
88
|
+
}
|
89
|
+
|
90
|
+
NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator];
|
91
|
+
if (coordinator != nil) {
|
92
|
+
_managedObjectContext = [[NSManagedObjectContext alloc] init];
|
93
|
+
[_managedObjectContext setPersistentStoreCoordinator:coordinator];
|
94
|
+
}
|
95
|
+
return _managedObjectContext;
|
96
|
+
}
|
97
|
+
|
98
|
+
// Returns the managed object model for the application.
|
99
|
+
// If the model doesn't already exist, it is created from the application's model.
|
100
|
+
- (NSManagedObjectModel *)managedObjectModel
|
101
|
+
{
|
102
|
+
if (_managedObjectModel != nil) {
|
103
|
+
return _managedObjectModel;
|
104
|
+
}
|
105
|
+
NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"FurterApp" withExtension:@"momd"];
|
106
|
+
_managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL];
|
107
|
+
return _managedObjectModel;
|
108
|
+
}
|
109
|
+
|
110
|
+
// Returns the persistent store coordinator for the application.
|
111
|
+
// If the coordinator doesn't already exist, it is created and the application's store added to it.
|
112
|
+
- (NSPersistentStoreCoordinator *)persistentStoreCoordinator
|
113
|
+
{
|
114
|
+
if (_persistentStoreCoordinator != nil) {
|
115
|
+
return _persistentStoreCoordinator;
|
116
|
+
}
|
117
|
+
|
118
|
+
NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"FurterApp.sqlite"];
|
119
|
+
|
120
|
+
NSError *error = nil;
|
121
|
+
_persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]];
|
122
|
+
if (![_persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:nil error:&error]) {
|
123
|
+
/*
|
124
|
+
Replace this implementation with code to handle the error appropriately.
|
125
|
+
|
126
|
+
abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
|
127
|
+
|
128
|
+
Typical reasons for an error here include:
|
129
|
+
* The persistent store is not accessible;
|
130
|
+
* The schema for the persistent store is incompatible with current managed object model.
|
131
|
+
Check the error message to determine what the actual problem was.
|
132
|
+
|
133
|
+
|
134
|
+
If the persistent store is not accessible, there is typically something wrong with the file path. Often, a file URL is pointing into the application's resources directory instead of a writeable directory.
|
135
|
+
|
136
|
+
If you encounter schema incompatibility errors during development, you can reduce their frequency by:
|
137
|
+
* Simply deleting the existing store:
|
138
|
+
[[NSFileManager defaultManager] removeItemAtURL:storeURL error:nil]
|
139
|
+
|
140
|
+
* Performing automatic lightweight migration by passing the following dictionary as the options parameter:
|
141
|
+
@{NSMigratePersistentStoresAutomaticallyOption:@YES, NSInferMappingModelAutomaticallyOption:@YES}
|
142
|
+
|
143
|
+
Lightweight migration will only work for a limited set of schema changes; consult "Core Data Model Versioning and Data Migration Programming Guide" for details.
|
144
|
+
|
145
|
+
*/
|
146
|
+
NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
|
147
|
+
abort();
|
148
|
+
}
|
149
|
+
|
150
|
+
return _persistentStoreCoordinator;
|
151
|
+
}
|
152
|
+
|
153
|
+
#pragma mark - Application's Documents directory
|
154
|
+
|
155
|
+
// Returns the URL to the application's Documents directory.
|
156
|
+
- (NSURL *)applicationDocumentsDirectory
|
157
|
+
{
|
158
|
+
return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];
|
159
|
+
}
|
160
|
+
|
161
|
+
@end
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,23 @@
|
|
1
|
+
//
|
2
|
+
// DetailViewController.h
|
3
|
+
// FurterApp
|
4
|
+
//
|
5
|
+
// Created by Levi Wilson on 3/20/13.
|
6
|
+
// Copyright (c) 2013 Levi Wilson. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import <UIKit/UIKit.h>
|
10
|
+
|
11
|
+
@interface DetailViewController : UIViewController <UISplitViewControllerDelegate>
|
12
|
+
- (IBAction)someButtonClick:(id)sender;
|
13
|
+
@property (weak, nonatomic) IBOutlet UITextField *placeholderTextField;
|
14
|
+
@property (weak, nonatomic) IBOutlet UITextField *labelTextField;
|
15
|
+
@property (weak, nonatomic) IBOutlet UIButton *textButton;
|
16
|
+
@property (weak, nonatomic) IBOutlet UIButton *labeledButton;
|
17
|
+
@property (weak, nonatomic) IBOutlet UILabel *labeledLabel;
|
18
|
+
|
19
|
+
@property (strong, nonatomic) id detailItem;
|
20
|
+
|
21
|
+
- (IBAction)onLabeledButtonClicked:(id)sender;
|
22
|
+
@property (weak, nonatomic) IBOutlet UILabel *detailDescriptionLabel;
|
23
|
+
@end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
//
|
2
|
+
// DetailViewController.m
|
3
|
+
// FurterApp
|
4
|
+
//
|
5
|
+
// Created by Levi Wilson on 3/20/13.
|
6
|
+
// Copyright (c) 2013 Levi Wilson. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import "DetailViewController.h"
|
10
|
+
|
11
|
+
@interface DetailViewController ()
|
12
|
+
@property (strong, nonatomic) UIPopoverController *masterPopoverController;
|
13
|
+
- (void)configureView;
|
14
|
+
@end
|
15
|
+
|
16
|
+
@implementation DetailViewController
|
17
|
+
|
18
|
+
#pragma mark - Managing the detail item
|
19
|
+
|
20
|
+
- (void)setDetailItem:(id)newDetailItem
|
21
|
+
{
|
22
|
+
if (_detailItem != newDetailItem) {
|
23
|
+
_detailItem = newDetailItem;
|
24
|
+
|
25
|
+
// Update the view.
|
26
|
+
[self configureView];
|
27
|
+
}
|
28
|
+
|
29
|
+
if (self.masterPopoverController != nil) {
|
30
|
+
[self.masterPopoverController dismissPopoverAnimated:YES];
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
- (void)configureView
|
35
|
+
{
|
36
|
+
// Update the user interface for the detail item.
|
37
|
+
|
38
|
+
if (self.detailItem) {
|
39
|
+
self.detailDescriptionLabel.text = [[self.detailItem valueForKey:@"timeStamp"] description];
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
- (void)viewDidLoad
|
44
|
+
{
|
45
|
+
[super viewDidLoad];
|
46
|
+
// Do any additional setup after loading the view, typically from a nib.
|
47
|
+
[self configureView];
|
48
|
+
[self.labeledButton setAccessibilityLabel:@"labeledButtonId"];
|
49
|
+
[self.labeledLabel setAccessibilityLabel:@"labelByAccessibilityLabel"];
|
50
|
+
}
|
51
|
+
|
52
|
+
- (void)didReceiveMemoryWarning
|
53
|
+
{
|
54
|
+
[super didReceiveMemoryWarning];
|
55
|
+
// Dispose of any resources that can be recreated.
|
56
|
+
}
|
57
|
+
|
58
|
+
#pragma mark - Split view
|
59
|
+
|
60
|
+
- (void)splitViewController:(UISplitViewController *)splitController willHideViewController:(UIViewController *)viewController withBarButtonItem:(UIBarButtonItem *)barButtonItem forPopoverController:(UIPopoverController *)popoverController
|
61
|
+
{
|
62
|
+
barButtonItem.title = NSLocalizedString(@"Master", @"Master");
|
63
|
+
[self.navigationItem setLeftBarButtonItem:barButtonItem animated:YES];
|
64
|
+
self.masterPopoverController = popoverController;
|
65
|
+
}
|
66
|
+
|
67
|
+
- (void)splitViewController:(UISplitViewController *)splitController willShowViewController:(UIViewController *)viewController invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem
|
68
|
+
{
|
69
|
+
// Called when the view is shown again in the split view, invalidating the button and popover controller.
|
70
|
+
[self.navigationItem setLeftBarButtonItem:nil animated:YES];
|
71
|
+
self.masterPopoverController = nil;
|
72
|
+
}
|
73
|
+
|
74
|
+
- (IBAction)someButtonClick:(id)sender {
|
75
|
+
[self.labelTextField setText:@"The button was clicked!"];
|
76
|
+
}
|
77
|
+
- (IBAction)onLabeledButtonClicked:(id)sender {
|
78
|
+
[self.labelTextField setText:@"The labeled button was clicked!"];
|
79
|
+
}
|
80
|
+
@end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
+
<plist version="1.0">
|
4
|
+
<dict>
|
5
|
+
<key>CFBundleDevelopmentRegion</key>
|
6
|
+
<string>en</string>
|
7
|
+
<key>CFBundleDisplayName</key>
|
8
|
+
<string>${PRODUCT_NAME}</string>
|
9
|
+
<key>CFBundleExecutable</key>
|
10
|
+
<string>${EXECUTABLE_NAME}</string>
|
11
|
+
<key>CFBundleIdentifier</key>
|
12
|
+
<string>com.leviwilson.${PRODUCT_NAME:rfc1034identifier}</string>
|
13
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
14
|
+
<string>6.0</string>
|
15
|
+
<key>CFBundleName</key>
|
16
|
+
<string>${PRODUCT_NAME}</string>
|
17
|
+
<key>CFBundlePackageType</key>
|
18
|
+
<string>APPL</string>
|
19
|
+
<key>CFBundleShortVersionString</key>
|
20
|
+
<string>1.0</string>
|
21
|
+
<key>CFBundleSignature</key>
|
22
|
+
<string>????</string>
|
23
|
+
<key>CFBundleVersion</key>
|
24
|
+
<string>1.0</string>
|
25
|
+
<key>LSRequiresIPhoneOS</key>
|
26
|
+
<true/>
|
27
|
+
<key>UIMainStoryboardFile</key>
|
28
|
+
<string>MainStoryboard_iPhone</string>
|
29
|
+
<key>UIMainStoryboardFile~ipad</key>
|
30
|
+
<string>MainStoryboard_iPad</string>
|
31
|
+
<key>UIRequiredDeviceCapabilities</key>
|
32
|
+
<array>
|
33
|
+
<string>armv7</string>
|
34
|
+
</array>
|
35
|
+
<key>UIStatusBarTintParameters</key>
|
36
|
+
<dict>
|
37
|
+
<key>UINavigationBar</key>
|
38
|
+
<dict>
|
39
|
+
<key>Style</key>
|
40
|
+
<string>UIBarStyleDefault</string>
|
41
|
+
<key>Translucent</key>
|
42
|
+
<false/>
|
43
|
+
</dict>
|
44
|
+
</dict>
|
45
|
+
<key>UISupportedInterfaceOrientations</key>
|
46
|
+
<array>
|
47
|
+
<string>UIInterfaceOrientationPortrait</string>
|
48
|
+
<string>UIInterfaceOrientationLandscapeLeft</string>
|
49
|
+
<string>UIInterfaceOrientationLandscapeRight</string>
|
50
|
+
</array>
|
51
|
+
<key>UISupportedInterfaceOrientations~ipad</key>
|
52
|
+
<array>
|
53
|
+
<string>UIInterfaceOrientationPortrait</string>
|
54
|
+
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
55
|
+
<string>UIInterfaceOrientationLandscapeLeft</string>
|
56
|
+
<string>UIInterfaceOrientationLandscapeRight</string>
|
57
|
+
</array>
|
58
|
+
</dict>
|
59
|
+
</plist>
|