UIKit Catalog: Version 13.2, 2016-09-13

Updated to Swift 2.3.
This commit is contained in:
Liu Lantao 2016-10-09 10:22:53 +08:00
parent 066301214e
commit ab88a73bc7
46 changed files with 908 additions and 1209 deletions

View File

@ -1,5 +1,5 @@
Sample code project: UIKit Catalog (iOS): Creating and Customizing UIKit Controls Sample code project: UIKit Catalog (iOS): Creating and Customizing UIKit Controls
Version: 13.1 Version: 13.2
IMPORTANT: This Apple software is supplied to you by Apple IMPORTANT: This Apple software is supplied to you by Apple
Inc. ("Apple") in consideration of your agreement to the following Inc. ("Apple") in consideration of your agreement to the following

View File

@ -14,9 +14,6 @@
3E8CF107196DD83A00420B6B /* AAPLSearchBarEmbeddedInNavigationBarViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E8CF106196DD83A00420B6B /* AAPLSearchBarEmbeddedInNavigationBarViewController.m */; }; 3E8CF107196DD83A00420B6B /* AAPLSearchBarEmbeddedInNavigationBarViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E8CF106196DD83A00420B6B /* AAPLSearchBarEmbeddedInNavigationBarViewController.m */; };
3EC13ADE1933D95700915353 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3EC13AE01933D95700915353 /* Main.storyboard */; }; 3EC13ADE1933D95700915353 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3EC13AE01933D95700915353 /* Main.storyboard */; };
3EE0A033196DDDF70059F740 /* AAPLSearchPresentOverNavigationBarViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EE0A032196DDDF70059F740 /* AAPLSearchPresentOverNavigationBarViewController.m */; }; 3EE0A033196DDDF70059F740 /* AAPLSearchPresentOverNavigationBarViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EE0A032196DDDF70059F740 /* AAPLSearchPresentOverNavigationBarViewController.m */; };
5356823E18F3656900BAAD62 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5356823D18F3656900BAAD62 /* Foundation.framework */; };
5356824018F3656900BAAD62 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5356823F18F3656900BAAD62 /* CoreGraphics.framework */; };
5356824218F3656900BAAD62 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5356824118F3656900BAAD62 /* UIKit.framework */; };
5356824A18F3656900BAAD62 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5356824918F3656900BAAD62 /* main.m */; }; 5356824A18F3656900BAAD62 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5356824918F3656900BAAD62 /* main.m */; };
5356825918F3656900BAAD62 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5356825818F3656900BAAD62 /* Images.xcassets */; }; 5356825918F3656900BAAD62 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5356825818F3656900BAAD62 /* Images.xcassets */; };
535682A818F3670300BAAD62 /* AAPLActivityIndicatorViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5356827818F3670300BAAD62 /* AAPLActivityIndicatorViewController.m */; }; 535682A818F3670300BAAD62 /* AAPLActivityIndicatorViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5356827818F3670300BAAD62 /* AAPLActivityIndicatorViewController.m */; };
@ -62,9 +59,6 @@
3EE0A031196DDDF70059F740 /* AAPLSearchPresentOverNavigationBarViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLSearchPresentOverNavigationBarViewController.h; sourceTree = "<group>"; }; 3EE0A031196DDDF70059F740 /* AAPLSearchPresentOverNavigationBarViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AAPLSearchPresentOverNavigationBarViewController.h; sourceTree = "<group>"; };
3EE0A032196DDDF70059F740 /* AAPLSearchPresentOverNavigationBarViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLSearchPresentOverNavigationBarViewController.m; sourceTree = "<group>"; }; 3EE0A032196DDDF70059F740 /* AAPLSearchPresentOverNavigationBarViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AAPLSearchPresentOverNavigationBarViewController.m; sourceTree = "<group>"; };
5356823A18F3656900BAAD62 /* UIKitCatalog.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = UIKitCatalog.app; sourceTree = BUILT_PRODUCTS_DIR; }; 5356823A18F3656900BAAD62 /* UIKitCatalog.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = UIKitCatalog.app; sourceTree = BUILT_PRODUCTS_DIR; };
5356823D18F3656900BAAD62 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
5356823F18F3656900BAAD62 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
5356824118F3656900BAAD62 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
5356824518F3656900BAAD62 /* UIKitCatalog-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "UIKitCatalog-Info.plist"; sourceTree = "<group>"; }; 5356824518F3656900BAAD62 /* UIKitCatalog-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "UIKitCatalog-Info.plist"; sourceTree = "<group>"; };
5356824918F3656900BAAD62 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; 5356824918F3656900BAAD62 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
5356824B18F3656900BAAD62 /* UIKitCatalog-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIKitCatalog-Prefix.pch"; sourceTree = "<group>"; }; 5356824B18F3656900BAAD62 /* UIKitCatalog-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIKitCatalog-Prefix.pch"; sourceTree = "<group>"; };
@ -123,9 +117,6 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
5356824018F3656900BAAD62 /* CoreGraphics.framework in Frameworks */,
5356824218F3656900BAAD62 /* UIKit.framework in Frameworks */,
5356823E18F3656900BAAD62 /* Foundation.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -136,7 +127,7 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
3E38C1C0196F282000C8EA2C /* Search Bar */, 3E38C1C0196F282000C8EA2C /* Search Bar */,
3E38C1C1196F282B00C8EA2C /* Search Controlleers */, 3E38C1C1196F282B00C8EA2C /* Search Controllers */,
); );
name = Search; name = Search;
sourceTree = "<group>"; sourceTree = "<group>";
@ -163,7 +154,7 @@
name = "Search Bar"; name = "Search Bar";
sourceTree = "<group>"; sourceTree = "<group>";
}; };
3E38C1C1196F282B00C8EA2C /* Search Controlleers */ = { 3E38C1C1196F282B00C8EA2C /* Search Controllers */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
3E1D56EF194F68D800D8298E /* Base View Controllers */, 3E1D56EF194F68D800D8298E /* Base View Controllers */,
@ -174,7 +165,7 @@
3E8CF102196DBE6800420B6B /* AAPLSearchShowResultsInSourceViewController.h */, 3E8CF102196DBE6800420B6B /* AAPLSearchShowResultsInSourceViewController.h */,
3E8CF103196DBE6800420B6B /* AAPLSearchShowResultsInSourceViewController.m */, 3E8CF103196DBE6800420B6B /* AAPLSearchShowResultsInSourceViewController.m */,
); );
name = "Search Controlleers"; name = "Search Controllers";
sourceTree = "<group>"; sourceTree = "<group>";
}; };
3EF3286C1931DF2000B1C20C /* Toolbar View Controllers */ = { 3EF3286C1931DF2000B1C20C /* Toolbar View Controllers */ = {
@ -195,7 +186,6 @@
children = ( children = (
3E5C084C19748F0D00969DD7 /* README.md */, 3E5C084C19748F0D00969DD7 /* README.md */,
5356824318F3656900BAAD62 /* UIKitCatalog */, 5356824318F3656900BAAD62 /* UIKitCatalog */,
5356823C18F3656900BAAD62 /* Frameworks */,
5356823B18F3656900BAAD62 /* Products */, 5356823B18F3656900BAAD62 /* Products */,
); );
sourceTree = "<group>"; sourceTree = "<group>";
@ -208,16 +198,6 @@
name = Products; name = Products;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
5356823C18F3656900BAAD62 /* Frameworks */ = {
isa = PBXGroup;
children = (
5356823D18F3656900BAAD62 /* Foundation.framework */,
5356823F18F3656900BAAD62 /* CoreGraphics.framework */,
5356824118F3656900BAAD62 /* UIKit.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
5356824318F3656900BAAD62 /* UIKitCatalog */ = { 5356824318F3656900BAAD62 /* UIKitCatalog */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
@ -322,7 +302,7 @@
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
LastSwiftUpdateCheck = 0700; LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 0700; LastUpgradeCheck = 0800;
ORGANIZATIONNAME = f; ORGANIZATIONNAME = f;
}; };
buildConfigurationList = 5356823518F3656900BAAD62 /* Build configuration list for PBXProject "UIKitCatalog" */; buildConfigurationList = 5356823518F3656900BAAD62 /* Build configuration list for PBXProject "UIKitCatalog" */;
@ -440,12 +420,15 @@
CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES; ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99; GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO; GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0; GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = ( GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1", "DEBUG=1",
@ -480,11 +463,14 @@
CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES; COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO; ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99; GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNDECLARED_SELECTOR = YES;
@ -505,6 +491,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "UIKitCatalog/UIKitCatalog-Prefix.pch"; GCC_PREFIX_HEADER = "UIKitCatalog/UIKitCatalog-Prefix.pch";
INFOPLIST_FILE = "$(SRCROOT)/UIKitCatalog/UIKitCatalog-Info.plist"; INFOPLIST_FILE = "$(SRCROOT)/UIKitCatalog/UIKitCatalog-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.example.apple-samplecode.UIKitCatalog"; PRODUCT_BUNDLE_IDENTIFIER = "com.example.apple-samplecode.UIKitCatalog";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app; WRAPPER_EXTENSION = app;
@ -518,6 +505,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "UIKitCatalog/UIKitCatalog-Prefix.pch"; GCC_PREFIX_HEADER = "UIKitCatalog/UIKitCatalog-Prefix.pch";
INFOPLIST_FILE = "$(SRCROOT)/UIKitCatalog/UIKitCatalog-Info.plist"; INFOPLIST_FILE = "$(SRCROOT)/UIKitCatalog/UIKitCatalog-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.example.apple-samplecode.UIKitCatalog"; PRODUCT_BUNDLE_IDENTIFIER = "com.example.apple-samplecode.UIKitCatalog";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app; WRAPPER_EXTENSION = app;

View File

@ -264,6 +264,7 @@ typedef NS_ENUM(NSInteger, AAPLAlertControllerActionSheetRow) {
[self presentViewController:alertController animated:YES completion:nil]; [self presentViewController:alertController animated:YES completion:nil];
} }
#pragma mark - UITextFieldTextDidChangeNotification #pragma mark - UITextFieldTextDidChangeNotification
- (void)handleTextFieldTextDidChangeNotification:(NSNotification *)notification { - (void)handleTextFieldTextDidChangeNotification:(NSNotification *)notification {
@ -273,6 +274,7 @@ typedef NS_ENUM(NSInteger, AAPLAlertControllerActionSheetRow) {
self.secureTextAlertAction.enabled = textField.text.length >= 5; self.secureTextAlertAction.enabled = textField.text.length >= 5;
} }
#pragma mark - UITableViewDelegate #pragma mark - UITableViewDelegate
// Determine the action to perform based on the selected cell. // Determine the action to perform based on the selected cell.

View File

@ -11,6 +11,8 @@
@interface AAPLAppDelegate() <UISplitViewControllerDelegate> @interface AAPLAppDelegate() <UISplitViewControllerDelegate>
@end @end
#pragma mark -
@implementation AAPLAppDelegate @implementation AAPLAppDelegate
#pragma mark - UIApplicationDelegate #pragma mark - UIApplicationDelegate
@ -24,6 +26,7 @@
return YES; return YES;
} }
#pragma mark - UISplitViewControllerDelegate #pragma mark - UISplitViewControllerDelegate
- (UISplitViewControllerDisplayMode)targetDisplayModeForActionInSplitViewController:(UISplitViewController *)splitViewController { - (UISplitViewControllerDisplayMode)targetDisplayModeForActionInSplitViewController:(UISplitViewController *)splitViewController {

View File

@ -57,6 +57,7 @@ static void *AAPLProgressViewControllerContext = &AAPLProgressViewControllerCont
[self.progress removeObserver:self forKeyPath:@"fractionCompleted"]; [self.progress removeObserver:self forKeyPath:@"fractionCompleted"];
} }
#pragma mark - Configuration #pragma mark - Configuration
- (void)configureDefaultStyleProgressView { - (void)configureDefaultStyleProgressView {
@ -74,6 +75,7 @@ static void *AAPLProgressViewControllerContext = &AAPLProgressViewControllerCont
self.tintedProgressView.progressTintColor = [UIColor aapl_applicationPurpleColor]; self.tintedProgressView.progressTintColor = [UIColor aapl_applicationPurpleColor];
} }
#pragma mark - UIViewController #pragma mark - UIViewController
- (void)viewDidLoad { - (void)viewDidLoad {
@ -107,6 +109,7 @@ static void *AAPLProgressViewControllerContext = &AAPLProgressViewControllerCont
[self.updateTimer invalidate]; [self.updateTimer invalidate];
} }
#pragma mark - Key Value Observing (KVO) #pragma mark - Key Value Observing (KVO)
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
@ -121,6 +124,7 @@ static void *AAPLProgressViewControllerContext = &AAPLProgressViewControllerCont
} }
} }
#pragma mark - Convenience #pragma mark - Convenience
- (void)timerDidFire { - (void)timerDidFire {

View File

@ -29,6 +29,7 @@ NSString *const AAPLSearchControllerBaseViewControllerTableViewCellIdentifier =
self.visibleResults = self.allResults; self.visibleResults = self.allResults;
} }
#pragma mark - Property Overrides #pragma mark - Property Overrides
- (void)setFilterString:(NSString *)filterString { - (void)setFilterString:(NSString *)filterString {
@ -45,6 +46,7 @@ NSString *const AAPLSearchControllerBaseViewControllerTableViewCellIdentifier =
[self.tableView reloadData]; [self.tableView reloadData];
} }
#pragma mark - UITableViewDataSource #pragma mark - UITableViewDataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {

View File

@ -35,8 +35,6 @@
#pragma mark - Configuration #pragma mark - Configuration
- (void)configureDefaultSegmentedControl { - (void)configureDefaultSegmentedControl {
self.defaultSegmentedControl.momentary = YES;
[self.defaultSegmentedControl setEnabled:NO forSegmentAtIndex:0]; [self.defaultSegmentedControl setEnabled:NO forSegmentAtIndex:0];
[self.defaultSegmentedControl addTarget:self action:@selector(selectedSegmentDidChange:) forControlEvents:UIControlEventValueChanged]; [self.defaultSegmentedControl addTarget:self action:@selector(selectedSegmentDidChange:) forControlEvents:UIControlEventValueChanged];

View File

@ -35,6 +35,7 @@ static NSInteger AAPLStackViewControllerMaxArrangedSubviewsCount = 3;
[self updateAddRemoveButtons]; [self updateAddRemoveButtons];
} }
#pragma mark - Actions #pragma mark - Actions
- (IBAction)showFurtherDetailTapped:(UIButton *)sender { - (IBAction)showFurtherDetailTapped:(UIButton *)sender {
@ -88,6 +89,7 @@ static NSInteger AAPLStackViewControllerMaxArrangedSubviewsCount = 3;
[self updateAddRemoveButtons]; [self updateAddRemoveButtons];
} }
#pragma mark - Convenience #pragma mark - Convenience
- (void)updateAddRemoveButtons { - (void)updateAddRemoveButtons {

View File

@ -33,21 +33,6 @@
[self configureCustomTextField]; [self configureCustomTextField];
} }
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
// Listen for changes to keyboard visibility so that we can adjust the text view accordingly.
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleKeyboardNotification:) name:UIKeyboardWillShowNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleKeyboardNotification:) name:UIKeyboardWillHideNotification object:nil];
}
- (void)viewDidDisappear:(BOOL)animated {
[super viewDidDisappear:animated];
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillShowNotification object:nil];
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillHideNotification object:nil];
}
#pragma mark - Configuration #pragma mark - Configuration
@ -124,47 +109,6 @@
} }
#pragma mark - Keyboard Event Notifications
- (void)handleKeyboardNotification:(NSNotification *)notification {
NSDictionary *userInfo = notification.userInfo;
// Get information about the animation.
NSTimeInterval animationDuration = [userInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue];
UIViewAnimationOptions animationCurve = [userInfo[UIKeyboardAnimationCurveUserInfoKey] integerValue];
// Convert the keyboard frame from screen to view coordinates.
CGRect keyboardScreenBeginFrame = [userInfo[UIKeyboardFrameBeginUserInfoKey] CGRectValue];
CGRect keyboardScreenEndFrame = [userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
CGRect keyboardViewBeginFrame = [self.view convertRect:keyboardScreenBeginFrame fromView:self.view.window];
CGRect keyboardViewEndFrame = [self.view convertRect:keyboardScreenEndFrame fromView:self.view.window];
// Determine how far the keyboard has moved up or down.
CGFloat originDelta = keyboardViewEndFrame.origin.y - keyboardViewBeginFrame.origin.y;
// Calculate new scroll indicator and content insets for the table view.
UIEdgeInsets newIndicatorInsets = self.tableView.scrollIndicatorInsets;
newIndicatorInsets.bottom -= originDelta;
UIEdgeInsets newContentInsets = self.tableView.contentInset;
newContentInsets.bottom -= originDelta;
// Update the insets on the table view with the new values.
self.tableView.scrollIndicatorInsets = newIndicatorInsets;
self.tableView.contentInset = newContentInsets;
// Inform the view that its the layout should be updated.
[self.view setNeedsLayout];
// Animate updating the view's layout by calling `layoutIfNeeded` inside a `UIView` animation block.
UIViewAnimationOptions animationOptions = animationCurve | UIViewAnimationOptionBeginFromCurrentState;
[UIView animateWithDuration:animationDuration delay:0 options:animationOptions animations:^{
[self.view layoutIfNeeded];
} completion:nil];
}
#pragma mark - Actions #pragma mark - Actions
- (void)customTextFieldPurpleButtonClicked { - (void)customTextFieldPurpleButtonClicked {

View File

@ -83,8 +83,10 @@
- (void)configureTextView { - (void)configureTextView {
UIFontDescriptor *bodyFontDescriptor = [UIFontDescriptor preferredFontDescriptorWithTextStyle:UIFontTextStyleBody]; UIFontDescriptor *bodyFontDescriptor = [UIFontDescriptor preferredFontDescriptorWithTextStyle:UIFontTextStyleBody];
self.textView.font = [UIFont fontWithDescriptor:bodyFontDescriptor size:0];
UIFont *bodyFont = [UIFont fontWithDescriptor:bodyFontDescriptor size:0];
self.textView.font = bodyFont;
self.textView.textColor = [UIColor blackColor]; self.textView.textColor = [UIColor blackColor];
self.textView.backgroundColor = [UIColor whiteColor]; self.textView.backgroundColor = [UIColor whiteColor];
self.textView.scrollEnabled = YES; self.textView.scrollEnabled = YES;
@ -127,6 +129,11 @@
NSAttributedString *textAttachmentString = [NSAttributedString attributedStringWithAttachment:textAttachment]; NSAttributedString *textAttachmentString = [NSAttributedString attributedStringWithAttachment:textAttachment];
[attributedText appendAttributedString:textAttachmentString]; [attributedText appendAttributedString:textAttachmentString];
// Append a space with matching font of the rest of the body text.
NSMutableAttributedString *appendedSpace = [[NSMutableAttributedString alloc] initWithString:@" "];
[appendedSpace addAttribute:NSFontAttributeName value:bodyFont range:NSMakeRange(0,1)];
[attributedText appendAttributedString:appendedSpace];
self.textView.attributedText = attributedText; self.textView.attributedText = attributedText;
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8121.17" systemVersion="15A178t" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="Qor-tF-7No"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11198.2" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="Qor-tF-7No">
<dependencies> <dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8101.14"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<scenes> <scenes>
<!--Navigation Controller--> <!--Navigation Controller-->
@ -11,7 +12,6 @@
<navigationBar key="navigationBar" contentMode="scaleToFill" id="DVP-C2-P9u"> <navigationBar key="navigationBar" contentMode="scaleToFill" id="DVP-C2-P9u">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/> <rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<animations/>
</navigationBar> </navigationBar>
<connections> <connections>
<segue destination="v21-vF-FLh" kind="relationship" relationship="rootViewController" id="mZ3-aU-nfI"/> <segue destination="v21-vF-FLh" kind="relationship" relationship="rootViewController" id="mZ3-aU-nfI"/>
@ -26,71 +26,62 @@
<objects> <objects>
<tableViewController id="v21-vF-FLh" sceneMemberID="viewController"> <tableViewController id="v21-vF-FLh" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="d2N-kr-XWw"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="d2N-kr-XWw">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<animations/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<sections> <sections>
<tableViewSection headerTitle="Search Bars" id="1Pr-U6-zci"> <tableViewSection headerTitle="Search Bars" id="1Pr-U6-zci">
<cells> <cells>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="J7w-dm-KuG" detailTextLabel="C7Y-NY-GyP" style="IBUITableViewCellStyleSubtitle" id="td3-Jx-XEj"> <tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="J7w-dm-KuG" detailTextLabel="C7Y-NY-GyP" style="IBUITableViewCellStyleSubtitle" id="td3-Jx-XEj">
<rect key="frame" x="0.0" y="86" width="600" height="44"/> <rect key="frame" x="0.0" y="86" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="td3-Jx-XEj" id="LZu-Ux-UPp"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="td3-Jx-XEj" id="LZu-Ux-UPp">
<rect key="frame" x="0.0" y="0.0" width="567" height="43"/> <frame key="frameInset" width="342" height="43.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Default" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="J7w-dm-KuG"> <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Default" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="J7w-dm-KuG">
<rect key="frame" x="15" y="5" width="53" height="20"/> <frame key="frameInset" minX="15" minY="6" width="52.5" height="19.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<animations/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="AAPLDefaultSearchBarViewController" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="C7Y-NY-GyP"> <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="AAPLDefaultSearchBarViewController" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="C7Y-NY-GyP">
<rect key="frame" x="15" y="25" width="198" height="14"/> <frame key="frameInset" minX="15" minY="25.5" width="197.5" height="13.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<animations/>
<fontDescription key="fontDescription" type="system" pointSize="11"/> <fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
</subviews> </subviews>
<animations/>
</tableViewCellContentView> </tableViewCellContentView>
<animations/>
<connections> <connections>
<segue destination="aTT-8g-UdL" kind="show" id="VM8-5g-Udp"/> <segue destination="aTT-8g-UdL" kind="show" id="VM8-5g-Udp"/>
</connections> </connections>
</tableViewCell> </tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="CUN-ll-i8J" detailTextLabel="y7q-CG-m74" style="IBUITableViewCellStyleSubtitle" id="Ijh-SG-gIM"> <tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="CUN-ll-i8J" detailTextLabel="y7q-CG-m74" style="IBUITableViewCellStyleSubtitle" id="Ijh-SG-gIM">
<rect key="frame" x="0.0" y="130" width="600" height="44"/> <rect key="frame" x="0.0" y="130" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Ijh-SG-gIM" id="5qL-RQ-3wJ"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Ijh-SG-gIM" id="5qL-RQ-3wJ">
<rect key="frame" x="0.0" y="0.0" width="567" height="43"/> <frame key="frameInset" width="342" height="43.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Custom" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="CUN-ll-i8J"> <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Custom" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="CUN-ll-i8J">
<rect key="frame" x="15" y="5" width="57" height="20"/> <frame key="frameInset" minX="15" minY="6" width="56.5" height="19.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<animations/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="AAPLCustomSearchBarViewController" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="y7q-CG-m74"> <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="AAPLCustomSearchBarViewController" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="y7q-CG-m74">
<rect key="frame" x="15" y="25" width="200" height="14"/> <frame key="frameInset" minX="15" minY="25.5" width="200" height="13.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<animations/>
<fontDescription key="fontDescription" type="system" pointSize="11"/> <fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
</subviews> </subviews>
<animations/>
</tableViewCellContentView> </tableViewCellContentView>
<animations/>
<connections> <connections>
<segue destination="Mhd-Bs-sIn" kind="show" id="m4S-2s-OdZ"/> <segue destination="Mhd-Bs-sIn" kind="show" id="m4S-2s-OdZ"/>
</connections> </connections>
@ -100,94 +91,82 @@
<tableViewSection headerTitle="Search Controllers" id="SfU-ko-RSc"> <tableViewSection headerTitle="Search Controllers" id="SfU-ko-RSc">
<cells> <cells>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="c5J-dW-Oa4" detailTextLabel="egk-uS-BWY" style="IBUITableViewCellStyleSubtitle" id="ZBu-Ux-eMx"> <tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="c5J-dW-Oa4" detailTextLabel="egk-uS-BWY" style="IBUITableViewCellStyleSubtitle" id="ZBu-Ux-eMx">
<rect key="frame" x="0.0" y="196" width="600" height="44"/> <rect key="frame" x="0.0" y="196" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ZBu-Ux-eMx" id="DrZ-KK-saf"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ZBu-Ux-eMx" id="DrZ-KK-saf">
<rect key="frame" x="0.0" y="0.0" width="567" height="43"/> <frame key="frameInset" width="342" height="43.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Present Over Navigation Bar" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="c5J-dW-Oa4"> <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Present Over Navigation Bar" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="c5J-dW-Oa4">
<rect key="frame" x="15" y="5" width="205" height="20"/> <frame key="frameInset" minX="15" minY="6" width="204.5" height="19.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<animations/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="AAPLSearchPresentOverNavigationBarViewController" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="egk-uS-BWY"> <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="AAPLSearchPresentOverNavigationBarViewController" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="egk-uS-BWY">
<rect key="frame" x="15" y="25" width="281" height="14"/> <frame key="frameInset" minX="15" minY="25.5" width="280.5" height="13.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<animations/>
<fontDescription key="fontDescription" type="system" pointSize="11"/> <fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
</subviews> </subviews>
<animations/>
</tableViewCellContentView> </tableViewCellContentView>
<animations/>
<connections> <connections>
<segue destination="yzs-dR-TMM" kind="show" id="rQv-so-tEJ"/> <segue destination="yzs-dR-TMM" kind="show" id="rQv-so-tEJ"/>
</connections> </connections>
</tableViewCell> </tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="e8N-QA-Dg0" detailTextLabel="6cu-cO-8z6" style="IBUITableViewCellStyleSubtitle" id="XOv-Qp-Q7h"> <tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="e8N-QA-Dg0" detailTextLabel="6cu-cO-8z6" style="IBUITableViewCellStyleSubtitle" id="XOv-Qp-Q7h">
<rect key="frame" x="0.0" y="240" width="600" height="44"/> <rect key="frame" x="0.0" y="240" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="XOv-Qp-Q7h" id="wzd-3r-rbf"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="XOv-Qp-Q7h" id="wzd-3r-rbf">
<rect key="frame" x="0.0" y="0.0" width="567" height="43"/> <frame key="frameInset" width="342" height="43.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Search Bar Embedded in Navigation Bar" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="e8N-QA-Dg0"> <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Search Bar Embedded in Navigation Bar" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="e8N-QA-Dg0">
<rect key="frame" x="15" y="5" width="290" height="20"/> <frame key="frameInset" minX="15" minY="6" width="289" height="19.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<animations/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="AAPLSearchBarEmbeddedInNavigationBarController" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="6cu-cO-8z6"> <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="AAPLSearchBarEmbeddedInNavigationBarController" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="6cu-cO-8z6">
<rect key="frame" x="15" y="25" width="274" height="14"/> <frame key="frameInset" minX="15" minY="25.5" width="274" height="13.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<animations/>
<fontDescription key="fontDescription" type="system" pointSize="11"/> <fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
</subviews> </subviews>
<animations/>
</tableViewCellContentView> </tableViewCellContentView>
<animations/>
<connections> <connections>
<segue destination="aRM-gX-SK9" kind="show" id="nFZ-q0-V43"/> <segue destination="aRM-gX-SK9" kind="show" id="nFZ-q0-V43"/>
</connections> </connections>
</tableViewCell> </tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="Lee-nU-4h6" detailTextLabel="NWY-6S-fcP" style="IBUITableViewCellStyleSubtitle" id="8cM-ho-w1a"> <tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="Lee-nU-4h6" detailTextLabel="NWY-6S-fcP" style="IBUITableViewCellStyleSubtitle" id="8cM-ho-w1a">
<rect key="frame" x="0.0" y="284" width="600" height="44"/> <rect key="frame" x="0.0" y="284" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="8cM-ho-w1a" id="heY-a7-bup"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="8cM-ho-w1a" id="heY-a7-bup">
<rect key="frame" x="0.0" y="0.0" width="567" height="43"/> <frame key="frameInset" width="342" height="43.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Results in Searched Controller" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Lee-nU-4h6"> <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Results in Searched Controller" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Lee-nU-4h6">
<rect key="frame" x="15" y="5" width="220" height="20"/> <frame key="frameInset" minX="15" minY="6" width="219" height="19.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<animations/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="AAPLSearchShowResultsInSourceViewController" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="NWY-6S-fcP"> <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="AAPLSearchShowResultsInSourceViewController" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="NWY-6S-fcP">
<rect key="frame" x="15" y="25" width="256" height="14"/> <frame key="frameInset" minX="15" minY="25.5" width="255" height="13.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<animations/>
<fontDescription key="fontDescription" type="system" pointSize="11"/> <fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
</subviews> </subviews>
<animations/>
</tableViewCellContentView> </tableViewCellContentView>
<animations/>
<connections> <connections>
<segue destination="fjx-Zc-6QZ" kind="show" id="EoB-yP-a6g"/> <segue destination="fjx-Zc-6QZ" kind="show" id="EoB-yP-a6g"/>
</connections> </connections>
@ -216,20 +195,17 @@
<viewControllerLayoutGuide type="bottom" id="qJE-Zg-4We"/> <viewControllerLayoutGuide type="bottom" id="qJE-Zg-4We"/>
</layoutGuides> </layoutGuides>
<view key="view" contentMode="scaleToFill" id="VZF-3b-rcm"> <view key="view" contentMode="scaleToFill" id="VZF-3b-rcm">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<searchBar contentMode="redraw" translatesAutoresizingMaskIntoConstraints="NO" id="wag-WL-u6e"> <searchBar contentMode="redraw" translatesAutoresizingMaskIntoConstraints="NO" id="wag-WL-u6e">
<rect key="frame" x="0.0" y="64" width="600" height="44"/>
<animations/>
<textInputTraits key="textInputTraits"/> <textInputTraits key="textInputTraits"/>
<connections> <connections>
<outlet property="delegate" destination="aTT-8g-UdL" id="Ixz-nw-Grc"/> <outlet property="delegate" destination="aTT-8g-UdL" id="Ixz-nw-Grc"/>
</connections> </connections>
</searchBar> </searchBar>
</subviews> </subviews>
<animations/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints> <constraints>
<constraint firstAttribute="trailing" secondItem="wag-WL-u6e" secondAttribute="trailing" id="2FT-aX-eAh"/> <constraint firstAttribute="trailing" secondItem="wag-WL-u6e" secondAttribute="trailing" id="2FT-aX-eAh"/>
<constraint firstItem="wag-WL-u6e" firstAttribute="top" secondItem="Jzw-sa-gBB" secondAttribute="bottom" id="9Vn-d9-Qts"/> <constraint firstItem="wag-WL-u6e" firstAttribute="top" secondItem="Jzw-sa-gBB" secondAttribute="bottom" id="9Vn-d9-Qts"/>
@ -260,20 +236,17 @@
<viewControllerLayoutGuide type="bottom" id="TMO-Wg-Ehd"/> <viewControllerLayoutGuide type="bottom" id="TMO-Wg-Ehd"/>
</layoutGuides> </layoutGuides>
<view key="view" contentMode="scaleToFill" id="YVy-et-UAQ"> <view key="view" contentMode="scaleToFill" id="YVy-et-UAQ">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<searchBar contentMode="redraw" translatesAutoresizingMaskIntoConstraints="NO" id="d4g-eI-DIw"> <searchBar contentMode="redraw" translatesAutoresizingMaskIntoConstraints="NO" id="d4g-eI-DIw">
<rect key="frame" x="0.0" y="64" width="600" height="44"/>
<animations/>
<textInputTraits key="textInputTraits"/> <textInputTraits key="textInputTraits"/>
<connections> <connections>
<outlet property="delegate" destination="Mhd-Bs-sIn" id="fpK-JW-vvF"/> <outlet property="delegate" destination="Mhd-Bs-sIn" id="fpK-JW-vvF"/>
</connections> </connections>
</searchBar> </searchBar>
</subviews> </subviews>
<animations/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints> <constraints>
<constraint firstItem="d4g-eI-DIw" firstAttribute="top" secondItem="Mkx-jp-pJ8" secondAttribute="bottom" id="Iqz-07-VrO"/> <constraint firstItem="d4g-eI-DIw" firstAttribute="top" secondItem="Mkx-jp-pJ8" secondAttribute="bottom" id="Iqz-07-VrO"/>
<constraint firstAttribute="trailing" secondItem="d4g-eI-DIw" secondAttribute="trailing" id="ROc-RY-l7C"/> <constraint firstAttribute="trailing" secondItem="d4g-eI-DIw" secondAttribute="trailing" id="ROc-RY-l7C"/>
@ -300,30 +273,26 @@
<objects> <objects>
<tableViewController title="Present Over Navigation Bar" id="yzs-dR-TMM" customClass="AAPLSearchPresentOverNavigationBarViewController" sceneMemberID="viewController"> <tableViewController title="Present Over Navigation Bar" id="yzs-dR-TMM" customClass="AAPLSearchPresentOverNavigationBarViewController" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="RmR-zN-t9e"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="RmR-zN-t9e">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<animations/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes> <prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="searchResultsCell" textLabel="n1l-EF-aBW" style="IBUITableViewCellStyleDefault" id="p0y-Lh-wsh"> <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="searchResultsCell" textLabel="n1l-EF-aBW" style="IBUITableViewCellStyleDefault" id="p0y-Lh-wsh">
<rect key="frame" x="0.0" y="86" width="600" height="44"/> <rect key="frame" x="0.0" y="86" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="p0y-Lh-wsh" id="FeT-xB-H75"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="p0y-Lh-wsh" id="FeT-xB-H75">
<rect key="frame" x="0.0" y="0.0" width="600" height="43"/> <frame key="frameInset" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Search results cell" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="n1l-EF-aBW"> <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Search results cell" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="n1l-EF-aBW">
<rect key="frame" x="15" y="0.0" width="570" height="43"/> <frame key="frameInset" minX="15" width="345" height="43.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<animations/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
</subviews> </subviews>
<animations/>
</tableViewCellContentView> </tableViewCellContentView>
<animations/>
</tableViewCell> </tableViewCell>
</prototypes> </prototypes>
<connections> <connections>
@ -348,30 +317,26 @@
<objects> <objects>
<tableViewController id="aRM-gX-SK9" customClass="AAPLSearchBarEmbeddedInNavigationBarViewController" sceneMemberID="viewController"> <tableViewController id="aRM-gX-SK9" customClass="AAPLSearchBarEmbeddedInNavigationBarViewController" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="1PE-AW-QJq"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="1PE-AW-QJq">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<animations/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes> <prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="searchResultsCell" textLabel="rIb-i6-JL6" style="IBUITableViewCellStyleDefault" id="hOY-Jy-ScI"> <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="searchResultsCell" textLabel="rIb-i6-JL6" style="IBUITableViewCellStyleDefault" id="hOY-Jy-ScI">
<rect key="frame" x="0.0" y="86" width="600" height="44"/> <rect key="frame" x="0.0" y="86" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="hOY-Jy-ScI" id="WCi-bR-TE7"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="hOY-Jy-ScI" id="WCi-bR-TE7">
<rect key="frame" x="0.0" y="0.0" width="600" height="43"/> <frame key="frameInset" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Search results cell" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="rIb-i6-JL6"> <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Search results cell" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="rIb-i6-JL6">
<rect key="frame" x="15" y="0.0" width="570" height="43"/> <frame key="frameInset" minX="15" width="345" height="43.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<animations/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
</subviews> </subviews>
<animations/>
</tableViewCellContentView> </tableViewCellContentView>
<animations/>
</tableViewCell> </tableViewCell>
</prototypes> </prototypes>
<connections> <connections>
@ -390,30 +355,26 @@
<objects> <objects>
<tableViewController id="fjx-Zc-6QZ" customClass="AAPLSearchShowResultsInSourceViewController" sceneMemberID="viewController"> <tableViewController id="fjx-Zc-6QZ" customClass="AAPLSearchShowResultsInSourceViewController" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="964-BZ-diD"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="964-BZ-diD">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<animations/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes> <prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="searchResultsCell" textLabel="nnI-BD-1hr" style="IBUITableViewCellStyleDefault" id="dK8-cB-jjE"> <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="searchResultsCell" textLabel="nnI-BD-1hr" style="IBUITableViewCellStyleDefault" id="dK8-cB-jjE">
<rect key="frame" x="0.0" y="86" width="600" height="44"/> <rect key="frame" x="0.0" y="86" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="dK8-cB-jjE" id="gp4-yV-Xar"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="dK8-cB-jjE" id="gp4-yV-Xar">
<rect key="frame" x="0.0" y="0.0" width="600" height="43"/> <frame key="frameInset" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Search results cell" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="nnI-BD-1hr"> <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Search results cell" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="nnI-BD-1hr">
<rect key="frame" x="15" y="0.0" width="570" height="43"/> <frame key="frameInset" minX="15" width="345" height="43.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<animations/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
</subviews> </subviews>
<animations/>
</tableViewCellContentView> </tableViewCellContentView>
<animations/>
</tableViewCell> </tableViewCell>
</prototypes> </prototypes>
<connections> <connections>
@ -432,30 +393,26 @@
<objects> <objects>
<tableViewController storyboardIdentifier="AAPLSearchResultsViewControllerStoryboardIdentifier" id="Thx-B6-QkK" customClass="AAPLSearchResultsViewController" sceneMemberID="viewController"> <tableViewController storyboardIdentifier="AAPLSearchResultsViewControllerStoryboardIdentifier" id="Thx-B6-QkK" customClass="AAPLSearchResultsViewController" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="QvM-3S-GbD"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="QvM-3S-GbD">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<animations/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes> <prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="searchResultsCell" textLabel="Fze-SS-t1Y" style="IBUITableViewCellStyleDefault" id="Z89-zd-E8L"> <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="searchResultsCell" textLabel="Fze-SS-t1Y" style="IBUITableViewCellStyleDefault" id="Z89-zd-E8L">
<rect key="frame" x="0.0" y="22" width="600" height="44"/> <rect key="frame" x="0.0" y="22" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Z89-zd-E8L" id="OXE-Q3-c2v"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Z89-zd-E8L" id="OXE-Q3-c2v">
<rect key="frame" x="0.0" y="0.0" width="600" height="43"/> <frame key="frameInset" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Search results cell" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Fze-SS-t1Y"> <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Search results cell" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Fze-SS-t1Y">
<rect key="frame" x="15" y="0.0" width="570" height="43"/> <frame key="frameInset" minX="15" width="345" height="43.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<animations/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
</subviews> </subviews>
<animations/>
</tableViewCellContentView> </tableViewCellContentView>
<animations/>
</tableViewCell> </tableViewCell>
</prototypes> </prototypes>
<connections> <connections>

View File

@ -17,11 +17,11 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>12.0</string> <string>13.2</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>12.0</string> <string>13.2</string>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<true/> <true/>
<key>UILaunchStoryboardName</key> <key>UILaunchStoryboardName</key>

View File

@ -1,9 +1,5 @@
#import <Availability.h> #import <Availability.h>
#ifndef __IPHONE_7_0
#warning "This project uses features only available in iOS SDK 8.0 and later."
#endif
#ifdef __OBJC__ #ifdef __OBJC__
@import UIKit; @import UIKit;
@import Foundation; @import Foundation;

View File

@ -8,7 +8,7 @@ You will also notice this sample shows how to localize string content by using t
## Build Requirements ## Build Requirements
Xcode 7.3 and iOS 9.0 SDK or later Xcode 8.0 and iOS 10.0 SDK or later
## Runtime Requirements ## Runtime Requirements
@ -52,4 +52,4 @@ This sample demonstrates how to configure and customize the following controls /
+ UIToolbar + UIToolbar
+ UIWebView + UIWebView
Copyright (C) 2016 Apple Inc. All rights reserved. Copyright (C) 2008-2016 Apple Inc. All rights reserved.

View File

@ -244,8 +244,13 @@
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
LastSwiftUpdateCheck = 0700; LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 0700; LastUpgradeCheck = 0800;
ORGANIZATIONNAME = Apple; ORGANIZATIONNAME = Apple;
TargetAttributes = {
228DB9F218BC53F1002BA12A = {
LastSwiftMigration = 0800;
};
};
}; };
buildConfigurationList = 228DB9EE18BC53F1002BA12A /* Build configuration list for PBXProject "UIKitCatalog" */; buildConfigurationList = 228DB9EE18BC53F1002BA12A /* Build configuration list for PBXProject "UIKitCatalog" */;
compatibilityVersion = "Xcode 3.2"; compatibilityVersion = "Xcode 3.2";
@ -362,12 +367,15 @@
CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES; ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99; GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO; GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0; GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = ( GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1", "DEBUG=1",
@ -402,11 +410,14 @@
CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES; COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO; ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99; GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNDECLARED_SELECTOR = YES;
@ -424,10 +435,13 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = "$(SRCROOT)/UIKitCatalog/UIKitCatalog-Info.plist"; INFOPLIST_FILE = "$(SRCROOT)/UIKitCatalog/UIKitCatalog-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.example.apple-samplecode.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_BUNDLE_IDENTIFIER = "com.example.apple-samplecode.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 2.3;
}; };
name = Debug; name = Debug;
}; };
@ -435,10 +449,14 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = "$(SRCROOT)/UIKitCatalog/UIKitCatalog-Info.plist"; INFOPLIST_FILE = "$(SRCROOT)/UIKitCatalog/UIKitCatalog-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.example.apple-samplecode.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_BUNDLE_IDENTIFIER = "com.example.apple-samplecode.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 2.3;
}; };
name = Release; name = Release;
}; };

View File

@ -9,13 +9,13 @@
import UIKit import UIKit
class ActivityIndicatorViewController: UITableViewController { class ActivityIndicatorViewController: UITableViewController {
// MARK: Properties // MARK: - Properties
@IBOutlet weak var grayStyleActivityIndicatorView: UIActivityIndicatorView! @IBOutlet weak var grayStyleActivityIndicatorView: UIActivityIndicatorView!
@IBOutlet weak var tintedActivityIndicatorView: UIActivityIndicatorView! @IBOutlet weak var tintedActivityIndicatorView: UIActivityIndicatorView!
// MARK: View Life Cycle // MARK: - View Life Cycle
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
@ -26,7 +26,7 @@ class ActivityIndicatorViewController: UITableViewController {
// When activity is done, use UIActivityIndicatorView.stopAnimating(). // When activity is done, use UIActivityIndicatorView.stopAnimating().
} }
// MARK: Configuration // MARK: - Configuration
func configureGrayActivityIndicatorView() { func configureGrayActivityIndicatorView() {
grayStyleActivityIndicatorView.activityIndicatorViewStyle = .Gray grayStyleActivityIndicatorView.activityIndicatorViewStyle = .Gray

View File

@ -9,7 +9,7 @@
import UIKit import UIKit
class AlertControllerViewController : UITableViewController { class AlertControllerViewController : UITableViewController {
// MARK: Properties // MARK: - Properties
weak var secureTextAlertAction: UIAlertAction? weak var secureTextAlertAction: UIAlertAction?
@ -35,7 +35,7 @@ class AlertControllerViewController : UITableViewController {
] ]
} }
// MARK: UIAlertControllerStyleAlert Style Alerts // MARK: - UIAlertControllerStyleAlert Style Alerts
/// Show an alert with an "Okay" button. /// Show an alert with an "Okay" button.
func showSimpleAlert(_: NSIndexPath) { func showSimpleAlert(_: NSIndexPath) {
@ -200,7 +200,7 @@ class AlertControllerViewController : UITableViewController {
presentViewController(alertController, animated: true, completion: nil) presentViewController(alertController, animated: true, completion: nil)
} }
// MARK: UIAlertControllerStyleActionSheet Style Alerts // MARK: - UIAlertControllerStyleActionSheet Style Alerts
/// Show a dialog with an "Okay" and "Cancel" button. /// Show a dialog with an "Okay" and "Cancel" button.
func showOkayCancelActionSheet(selectedIndexPath: NSIndexPath) { func showOkayCancelActionSheet(selectedIndexPath: NSIndexPath) {
@ -266,7 +266,7 @@ class AlertControllerViewController : UITableViewController {
presentViewController(alertController, animated: true, completion: nil) presentViewController(alertController, animated: true, completion: nil)
} }
// MARK: UITextFieldTextDidChangeNotification // MARK: - UITextFieldTextDidChangeNotification
func handleTextFieldTextDidChangeNotification(notification: NSNotification) { func handleTextFieldTextDidChangeNotification(notification: NSNotification) {
let textField = notification.object as! UITextField let textField = notification.object as! UITextField
@ -280,7 +280,7 @@ class AlertControllerViewController : UITableViewController {
} }
} }
// MARK: UITableViewDelegate // MARK: - UITableViewDelegate
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
let action = actionMap[indexPath.section][indexPath.row] let action = actionMap[indexPath.section][indexPath.row]

View File

@ -10,11 +10,11 @@ import UIKit
@UIApplicationMain @UIApplicationMain
class AppDelegate: NSObject, UIApplicationDelegate, UISplitViewControllerDelegate { class AppDelegate: NSObject, UIApplicationDelegate, UISplitViewControllerDelegate {
// MARK: Properties // MARK: - Properties
var window: UIWindow? var window: UIWindow?
// MARK: UIApplicationDelegate // MARK: - UIApplicationDelegate
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
let splitViewController = window!.rootViewController as! UISplitViewController let splitViewController = window!.rootViewController as! UISplitViewController
@ -25,7 +25,7 @@ class AppDelegate: NSObject, UIApplicationDelegate, UISplitViewControllerDelegat
return true return true
} }
// MARK: UISplitViewControllerDelegate // MARK: - UISplitViewControllerDelegate
func targetDisplayModeForActionInSplitViewController(splitViewController: UISplitViewController) -> UISplitViewControllerDisplayMode { func targetDisplayModeForActionInSplitViewController(splitViewController: UISplitViewController) -> UISplitViewControllerDisplayMode {
return .AllVisible return .AllVisible

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10102" systemVersion="15E29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="6Ay-cF-67z"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11198.2" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="6Ay-cF-67z">
<dependencies> <dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10080"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<scenes> <scenes>
<!--Navigation Controller--> <!--Navigation Controller-->
@ -25,31 +26,31 @@
<objects> <objects>
<tableViewController id="v21-vF-FLh" sceneMemberID="viewController"> <tableViewController id="v21-vF-FLh" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="d2N-kr-XWw"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="d2N-kr-XWw">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<sections> <sections>
<tableViewSection headerTitle="Search Bars" id="1Pr-U6-zci"> <tableViewSection headerTitle="Search Bars" id="1Pr-U6-zci">
<cells> <cells>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="J7w-dm-KuG" detailTextLabel="C7Y-NY-GyP" style="IBUITableViewCellStyleSubtitle" id="td3-Jx-XEj"> <tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="J7w-dm-KuG" detailTextLabel="C7Y-NY-GyP" style="IBUITableViewCellStyleSubtitle" id="td3-Jx-XEj">
<rect key="frame" x="0.0" y="86" width="600" height="44"/> <rect key="frame" x="0.0" y="86" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="td3-Jx-XEj" id="LZu-Ux-UPp"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="td3-Jx-XEj" id="LZu-Ux-UPp">
<rect key="frame" x="0.0" y="0.0" width="567" height="43"/> <frame key="frameInset" width="342" height="43.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Default" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="J7w-dm-KuG"> <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Default" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="J7w-dm-KuG">
<rect key="frame" x="15" y="5" width="53" height="20"/> <frame key="frameInset" minX="15" minY="6" width="52.5" height="19.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="DefaultSearchBarViewController" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="C7Y-NY-GyP"> <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="DefaultSearchBarViewController" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="C7Y-NY-GyP">
<rect key="frame" x="15" y="25" width="170" height="14"/> <frame key="frameInset" minX="15" minY="25.5" width="169.5" height="13.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/> <fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
</subviews> </subviews>
@ -59,24 +60,24 @@
</connections> </connections>
</tableViewCell> </tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="CUN-ll-i8J" detailTextLabel="y7q-CG-m74" style="IBUITableViewCellStyleSubtitle" id="Ijh-SG-gIM"> <tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="CUN-ll-i8J" detailTextLabel="y7q-CG-m74" style="IBUITableViewCellStyleSubtitle" id="Ijh-SG-gIM">
<rect key="frame" x="0.0" y="130" width="600" height="44"/> <rect key="frame" x="0.0" y="130" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Ijh-SG-gIM" id="5qL-RQ-3wJ"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Ijh-SG-gIM" id="5qL-RQ-3wJ">
<rect key="frame" x="0.0" y="0.0" width="567" height="43"/> <frame key="frameInset" width="342" height="43.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Custom" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="CUN-ll-i8J"> <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Custom" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="CUN-ll-i8J">
<rect key="frame" x="15" y="5" width="57" height="20"/> <frame key="frameInset" minX="15" minY="6" width="56.5" height="19.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="CustomSearchBarViewController" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="y7q-CG-m74"> <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="CustomSearchBarViewController" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="y7q-CG-m74">
<rect key="frame" x="15" y="25" width="172" height="14"/> <frame key="frameInset" minX="15" minY="25.5" width="172" height="13.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/> <fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
</subviews> </subviews>
@ -90,24 +91,24 @@
<tableViewSection headerTitle="Search Controllers" id="SfU-ko-RSc"> <tableViewSection headerTitle="Search Controllers" id="SfU-ko-RSc">
<cells> <cells>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="c5J-dW-Oa4" detailTextLabel="egk-uS-BWY" style="IBUITableViewCellStyleSubtitle" id="ZBu-Ux-eMx"> <tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="c5J-dW-Oa4" detailTextLabel="egk-uS-BWY" style="IBUITableViewCellStyleSubtitle" id="ZBu-Ux-eMx">
<rect key="frame" x="0.0" y="196" width="600" height="44"/> <rect key="frame" x="0.0" y="196" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ZBu-Ux-eMx" id="DrZ-KK-saf"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ZBu-Ux-eMx" id="DrZ-KK-saf">
<rect key="frame" x="0.0" y="0.0" width="567" height="43"/> <frame key="frameInset" width="342" height="43.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Present Over Navigation Bar" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="c5J-dW-Oa4"> <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Present Over Navigation Bar" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="c5J-dW-Oa4">
<rect key="frame" x="15" y="5" width="205" height="20"/> <frame key="frameInset" minX="15" minY="6" width="204.5" height="19.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="SearchPresentOverNavigationBarViewController" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="egk-uS-BWY"> <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="SearchPresentOverNavigationBarViewController" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="egk-uS-BWY">
<rect key="frame" x="15" y="25" width="253" height="14"/> <frame key="frameInset" minX="15" minY="25.5" width="252.5" height="13.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/> <fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
</subviews> </subviews>
@ -117,24 +118,24 @@
</connections> </connections>
</tableViewCell> </tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="e8N-QA-Dg0" detailTextLabel="6cu-cO-8z6" style="IBUITableViewCellStyleSubtitle" id="XOv-Qp-Q7h"> <tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="e8N-QA-Dg0" detailTextLabel="6cu-cO-8z6" style="IBUITableViewCellStyleSubtitle" id="XOv-Qp-Q7h">
<rect key="frame" x="0.0" y="240" width="600" height="44"/> <rect key="frame" x="0.0" y="240" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="XOv-Qp-Q7h" id="wzd-3r-rbf"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="XOv-Qp-Q7h" id="wzd-3r-rbf">
<rect key="frame" x="0.0" y="0.0" width="567" height="43"/> <frame key="frameInset" width="342" height="43.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Search Bar Embedded in Navigation Bar" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="e8N-QA-Dg0"> <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Search Bar Embedded in Navigation Bar" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="e8N-QA-Dg0">
<rect key="frame" x="15" y="5" width="289" height="20"/> <frame key="frameInset" minX="15" minY="6" width="289" height="19.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="SearchBarEmbeddedInNavigationBarController" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="6cu-cO-8z6"> <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="SearchBarEmbeddedInNavigationBarController" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="6cu-cO-8z6">
<rect key="frame" x="15" y="25" width="246" height="14"/> <frame key="frameInset" minX="15" minY="25.5" width="245.5" height="13.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/> <fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
</subviews> </subviews>
@ -144,24 +145,24 @@
</connections> </connections>
</tableViewCell> </tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="Lee-nU-4h6" detailTextLabel="NWY-6S-fcP" style="IBUITableViewCellStyleSubtitle" id="8cM-ho-w1a"> <tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="Lee-nU-4h6" detailTextLabel="NWY-6S-fcP" style="IBUITableViewCellStyleSubtitle" id="8cM-ho-w1a">
<rect key="frame" x="0.0" y="284" width="600" height="44"/> <rect key="frame" x="0.0" y="284" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="8cM-ho-w1a" id="heY-a7-bup"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="8cM-ho-w1a" id="heY-a7-bup">
<rect key="frame" x="0.0" y="0.0" width="567" height="43"/> <frame key="frameInset" width="342" height="43.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Results in Searched Controller" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Lee-nU-4h6"> <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Results in Searched Controller" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Lee-nU-4h6">
<rect key="frame" x="15" y="5" width="219" height="20"/> <frame key="frameInset" minX="15" minY="6" width="219" height="19.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="SearchShowResultsInSourceViewController" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="NWY-6S-fcP"> <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="SearchShowResultsInSourceViewController" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="NWY-6S-fcP">
<rect key="frame" x="15" y="25" width="227" height="14"/> <frame key="frameInset" minX="15" minY="25.5" width="226.5" height="13.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/> <fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
</subviews> </subviews>
@ -194,18 +195,17 @@
<viewControllerLayoutGuide type="bottom" id="qJE-Zg-4We"/> <viewControllerLayoutGuide type="bottom" id="qJE-Zg-4We"/>
</layoutGuides> </layoutGuides>
<view key="view" contentMode="scaleToFill" id="VZF-3b-rcm"> <view key="view" contentMode="scaleToFill" id="VZF-3b-rcm">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<searchBar contentMode="redraw" translatesAutoresizingMaskIntoConstraints="NO" id="wag-WL-u6e"> <searchBar contentMode="redraw" translatesAutoresizingMaskIntoConstraints="NO" id="wag-WL-u6e">
<rect key="frame" x="0.0" y="64" width="600" height="44"/>
<textInputTraits key="textInputTraits"/> <textInputTraits key="textInputTraits"/>
<connections> <connections>
<outlet property="delegate" destination="aTT-8g-UdL" id="Ixz-nw-Grc"/> <outlet property="delegate" destination="aTT-8g-UdL" id="Ixz-nw-Grc"/>
</connections> </connections>
</searchBar> </searchBar>
</subviews> </subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints> <constraints>
<constraint firstAttribute="trailing" secondItem="wag-WL-u6e" secondAttribute="trailing" id="2FT-aX-eAh"/> <constraint firstAttribute="trailing" secondItem="wag-WL-u6e" secondAttribute="trailing" id="2FT-aX-eAh"/>
<constraint firstItem="wag-WL-u6e" firstAttribute="top" secondItem="Jzw-sa-gBB" secondAttribute="bottom" id="gSR-f7-0Pt"/> <constraint firstItem="wag-WL-u6e" firstAttribute="top" secondItem="Jzw-sa-gBB" secondAttribute="bottom" id="gSR-f7-0Pt"/>
@ -236,18 +236,17 @@
<viewControllerLayoutGuide type="bottom" id="TMO-Wg-Ehd"/> <viewControllerLayoutGuide type="bottom" id="TMO-Wg-Ehd"/>
</layoutGuides> </layoutGuides>
<view key="view" contentMode="scaleToFill" id="YVy-et-UAQ"> <view key="view" contentMode="scaleToFill" id="YVy-et-UAQ">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<searchBar contentMode="redraw" translatesAutoresizingMaskIntoConstraints="NO" id="d4g-eI-DIw"> <searchBar contentMode="redraw" translatesAutoresizingMaskIntoConstraints="NO" id="d4g-eI-DIw">
<rect key="frame" x="0.0" y="64" width="600" height="44"/>
<textInputTraits key="textInputTraits"/> <textInputTraits key="textInputTraits"/>
<connections> <connections>
<outlet property="delegate" destination="Mhd-Bs-sIn" id="fpK-JW-vvF"/> <outlet property="delegate" destination="Mhd-Bs-sIn" id="fpK-JW-vvF"/>
</connections> </connections>
</searchBar> </searchBar>
</subviews> </subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints> <constraints>
<constraint firstAttribute="trailing" secondItem="d4g-eI-DIw" secondAttribute="trailing" id="ROc-RY-l7C"/> <constraint firstAttribute="trailing" secondItem="d4g-eI-DIw" secondAttribute="trailing" id="ROc-RY-l7C"/>
<constraint firstItem="d4g-eI-DIw" firstAttribute="top" secondItem="Mkx-jp-pJ8" secondAttribute="bottom" id="aTJ-AA-W9z"/> <constraint firstItem="d4g-eI-DIw" firstAttribute="top" secondItem="Mkx-jp-pJ8" secondAttribute="bottom" id="aTJ-AA-W9z"/>
@ -274,22 +273,22 @@
<objects> <objects>
<tableViewController title="Present Over Navigation Bar" id="yzs-dR-TMM" customClass="SearchPresentOverNavigationBarViewController" customModule="UIKitCatalog" customModuleProvider="target" sceneMemberID="viewController"> <tableViewController title="Present Over Navigation Bar" id="yzs-dR-TMM" customClass="SearchPresentOverNavigationBarViewController" customModule="UIKitCatalog" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="RmR-zN-t9e"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="RmR-zN-t9e">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<prototypes> <prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="searchResultsCell" textLabel="n1l-EF-aBW" style="IBUITableViewCellStyleDefault" id="p0y-Lh-wsh"> <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="searchResultsCell" textLabel="n1l-EF-aBW" style="IBUITableViewCellStyleDefault" id="p0y-Lh-wsh">
<rect key="frame" x="0.0" y="86" width="600" height="44"/> <rect key="frame" x="0.0" y="86" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="p0y-Lh-wsh" id="FeT-xB-H75"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="p0y-Lh-wsh" id="FeT-xB-H75">
<rect key="frame" x="0.0" y="0.0" width="600" height="43"/> <frame key="frameInset" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Search results cell" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="n1l-EF-aBW"> <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Search results cell" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="n1l-EF-aBW">
<rect key="frame" x="15" y="0.0" width="570" height="43"/> <frame key="frameInset" minX="15" width="345" height="43.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
</subviews> </subviews>
@ -318,22 +317,22 @@
<objects> <objects>
<tableViewController id="aRM-gX-SK9" customClass="SearchBarEmbeddedInNavigationBarViewController" customModule="UIKitCatalog" customModuleProvider="target" sceneMemberID="viewController"> <tableViewController id="aRM-gX-SK9" customClass="SearchBarEmbeddedInNavigationBarViewController" customModule="UIKitCatalog" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="1PE-AW-QJq"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="1PE-AW-QJq">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<prototypes> <prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="searchResultsCell" textLabel="rIb-i6-JL6" style="IBUITableViewCellStyleDefault" id="hOY-Jy-ScI"> <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="searchResultsCell" textLabel="rIb-i6-JL6" style="IBUITableViewCellStyleDefault" id="hOY-Jy-ScI">
<rect key="frame" x="0.0" y="86" width="600" height="44"/> <rect key="frame" x="0.0" y="86" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="hOY-Jy-ScI" id="WCi-bR-TE7"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="hOY-Jy-ScI" id="WCi-bR-TE7">
<rect key="frame" x="0.0" y="0.0" width="600" height="43"/> <frame key="frameInset" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Search results cell" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="rIb-i6-JL6"> <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Search results cell" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="rIb-i6-JL6">
<rect key="frame" x="15" y="0.0" width="570" height="43"/> <frame key="frameInset" minX="15" width="345" height="43.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
</subviews> </subviews>
@ -356,22 +355,22 @@
<objects> <objects>
<tableViewController id="fjx-Zc-6QZ" customClass="SearchShowResultsInSourceViewController" customModule="UIKitCatalog" customModuleProvider="target" sceneMemberID="viewController"> <tableViewController id="fjx-Zc-6QZ" customClass="SearchShowResultsInSourceViewController" customModule="UIKitCatalog" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="964-BZ-diD"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="964-BZ-diD">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<prototypes> <prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="searchResultsCell" textLabel="nnI-BD-1hr" style="IBUITableViewCellStyleDefault" id="dK8-cB-jjE"> <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="searchResultsCell" textLabel="nnI-BD-1hr" style="IBUITableViewCellStyleDefault" id="dK8-cB-jjE">
<rect key="frame" x="0.0" y="86" width="600" height="44"/> <rect key="frame" x="0.0" y="86" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="dK8-cB-jjE" id="gp4-yV-Xar"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="dK8-cB-jjE" id="gp4-yV-Xar">
<rect key="frame" x="0.0" y="0.0" width="600" height="43"/> <frame key="frameInset" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Search results cell" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="nnI-BD-1hr"> <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Search results cell" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="nnI-BD-1hr">
<rect key="frame" x="15" y="0.0" width="570" height="43"/> <frame key="frameInset" minX="15" width="345" height="43.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
</subviews> </subviews>
@ -394,22 +393,22 @@
<objects> <objects>
<tableViewController storyboardIdentifier="SearchResultsViewControllerStoryboardIdentifier" id="Thx-B6-QkK" customClass="SearchResultsViewController" customModule="UIKitCatalog" customModuleProvider="target" sceneMemberID="viewController"> <tableViewController storyboardIdentifier="SearchResultsViewControllerStoryboardIdentifier" id="Thx-B6-QkK" customClass="SearchResultsViewController" customModule="UIKitCatalog" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="QvM-3S-GbD"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="QvM-3S-GbD">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<prototypes> <prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="searchResultsCell" textLabel="Fze-SS-t1Y" style="IBUITableViewCellStyleDefault" id="Z89-zd-E8L"> <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="searchResultsCell" textLabel="Fze-SS-t1Y" style="IBUITableViewCellStyleDefault" id="Z89-zd-E8L">
<rect key="frame" x="0.0" y="22" width="600" height="44"/> <rect key="frame" x="0.0" y="22" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Z89-zd-E8L" id="OXE-Q3-c2v"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Z89-zd-E8L" id="OXE-Q3-c2v">
<rect key="frame" x="0.0" y="0.0" width="600" height="43"/> <frame key="frameInset" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Search results cell" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Fze-SS-t1Y"> <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Search results cell" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Fze-SS-t1Y">
<rect key="frame" x="15" y="0.0" width="570" height="43"/> <frame key="frameInset" minX="15" width="345" height="43.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
</subviews> </subviews>

View File

@ -9,7 +9,7 @@
import UIKit import UIKit
class ButtonViewController: UITableViewController { class ButtonViewController: UITableViewController {
// MARK: Properties // MARK: - Properties
@IBOutlet weak var systemTextButton: UIButton! @IBOutlet weak var systemTextButton: UIButton!
@ -21,7 +21,7 @@ class ButtonViewController: UITableViewController {
@IBOutlet weak var attributedTextButton: UIButton! @IBOutlet weak var attributedTextButton: UIButton!
// MARK: View Life Cycle // MARK: - View Life Cycle
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
@ -34,7 +34,7 @@ class ButtonViewController: UITableViewController {
configureAttributedTextSystemButton() configureAttributedTextSystemButton()
} }
// MARK: Configuration // MARK: - Configuration
func configureSystemTextButton() { func configureSystemTextButton() {
let buttonTitle = NSLocalizedString("Button", comment: "") let buttonTitle = NSLocalizedString("Button", comment: "")
@ -95,7 +95,7 @@ class ButtonViewController: UITableViewController {
attributedTextButton.addTarget(self, action: #selector(ButtonViewController.buttonClicked(_:)), forControlEvents: .TouchUpInside) attributedTextButton.addTarget(self, action: #selector(ButtonViewController.buttonClicked(_:)), forControlEvents: .TouchUpInside)
} }
// MARK: Actions // MARK: - Actions
func buttonClicked(sender: UIButton) { func buttonClicked(sender: UIButton) {
NSLog("A button was clicked: \(sender).") NSLog("A button was clicked: \(sender).")

View File

@ -9,11 +9,11 @@
import UIKit import UIKit
class CustomSearchBarViewController: UIViewController, UISearchBarDelegate { class CustomSearchBarViewController: UIViewController, UISearchBarDelegate {
// MARK: Properties // MARK: - Properties
@IBOutlet weak var searchBar: UISearchBar! @IBOutlet weak var searchBar: UISearchBar!
// MARK: View Life Cycle // MARK: - View Life Cycle
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
@ -21,7 +21,7 @@ class CustomSearchBarViewController: UIViewController, UISearchBarDelegate {
configureSearchBar() configureSearchBar()
} }
// MARK: Configuration // MARK: - Configuration
func configureSearchBar() { func configureSearchBar() {
searchBar.showsCancelButton = true searchBar.showsCancelButton = true
@ -39,7 +39,7 @@ class CustomSearchBarViewController: UIViewController, UISearchBarDelegate {
searchBar.setImage(bookmarkHighlightedImage, forSearchBarIcon: .Bookmark, state: .Highlighted) searchBar.setImage(bookmarkHighlightedImage, forSearchBarIcon: .Bookmark, state: .Highlighted)
} }
// MARK: UISearchBarDelegate // MARK: - UISearchBarDelegate
func searchBarSearchButtonClicked(searchBar: UISearchBar) { func searchBarSearchButtonClicked(searchBar: UISearchBar) {
NSLog("The custom search bar keyboard search button was tapped: \(searchBar).") NSLog("The custom search bar keyboard search button was tapped: \(searchBar).")

View File

@ -9,11 +9,11 @@
import UIKit import UIKit
class CustomToolbarViewController: UIViewController { class CustomToolbarViewController: UIViewController {
// MARK: Properties // MARK: - Properties
@IBOutlet weak var toolbar: UIToolbar! @IBOutlet weak var toolbar: UIToolbar!
// MARK: View Life Cycle // MARK: - View Life Cycle
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
@ -21,7 +21,7 @@ class CustomToolbarViewController: UIViewController {
configureToolbar() configureToolbar()
} }
// MARK: Configuration // MARK: - Configuration
func configureToolbar() { func configureToolbar() {
let toolbarBackgroundImage = UIImage(named: "toolbar_background") let toolbarBackgroundImage = UIImage(named: "toolbar_background")
@ -36,7 +36,7 @@ class CustomToolbarViewController: UIViewController {
toolbar.setItems(toolbarButtonItems, animated: true) toolbar.setItems(toolbarButtonItems, animated: true)
} }
// MARK: UIBarButtonItem Creation and Configuration // MARK: - UIBarButtonItem Creation and Configuration
var customImageBarButtonItem: UIBarButtonItem { var customImageBarButtonItem: UIBarButtonItem {
let customBarButtonItemImage = UIImage(named: "tools_icon") let customBarButtonItemImage = UIImage(named: "tools_icon")
@ -67,7 +67,7 @@ class CustomToolbarViewController: UIViewController {
return barButtonItem return barButtonItem
} }
// MARK: Actions // MARK: - Actions
func barButtonItemClicked(barButtonItem: UIBarButtonItem) { func barButtonItemClicked(barButtonItem: UIBarButtonItem) {
NSLog("A bar button item on the custom toolbar was clicked: \(barButtonItem).") NSLog("A bar button item on the custom toolbar was clicked: \(barButtonItem).")

View File

@ -9,7 +9,7 @@
import UIKit import UIKit
class DatePickerController: UIViewController { class DatePickerController: UIViewController {
// MARK: Properties // MARK: - Properties
@IBOutlet weak var datePicker: UIDatePicker! @IBOutlet weak var datePicker: UIDatePicker!
@ -25,7 +25,7 @@ class DatePickerController: UIViewController {
return dateFormatter return dateFormatter
}() }()
// MARK: View Life Cycle // MARK: - View Life Cycle
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
@ -33,7 +33,7 @@ class DatePickerController: UIViewController {
configureDatePicker() configureDatePicker()
} }
// MARK: Configuration // MARK: - Configuration
func configureDatePicker() { func configureDatePicker() {
datePicker.datePickerMode = .DateAndTime datePicker.datePickerMode = .DateAndTime
@ -60,7 +60,7 @@ class DatePickerController: UIViewController {
updateDatePickerLabel() updateDatePickerLabel()
} }
// MARK: Actions // MARK: - Actions
func updateDatePickerLabel() { func updateDatePickerLabel() {
dateLabel.text = dateFormatter.stringFromDate(datePicker.date) dateLabel.text = dateFormatter.stringFromDate(datePicker.date)

View File

@ -9,11 +9,11 @@
import UIKit import UIKit
class DefaultSearchBarViewController: UIViewController, UISearchBarDelegate { class DefaultSearchBarViewController: UIViewController, UISearchBarDelegate {
// MARK: Properties // MARK: - Properties
@IBOutlet weak var searchBar: UISearchBar! @IBOutlet weak var searchBar: UISearchBar!
// MARK: View Life Cycle // MARK: - View Life Cycle
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
@ -21,7 +21,7 @@ class DefaultSearchBarViewController: UIViewController, UISearchBarDelegate {
configureSearchBar() configureSearchBar()
} }
// MARK: Configuration // MARK: - Configuration
func configureSearchBar() { func configureSearchBar() {
searchBar.showsCancelButton = true searchBar.showsCancelButton = true
@ -33,7 +33,7 @@ class DefaultSearchBarViewController: UIViewController, UISearchBarDelegate {
] ]
} }
// MARK: UISearchBarDelegate // MARK: - UISearchBarDelegate
func searchBar(searchBar: UISearchBar, selectedScopeButtonIndexDidChange selectedScope: Int) { func searchBar(searchBar: UISearchBar, selectedScopeButtonIndexDidChange selectedScope: Int) {
NSLog("The default search selected scope button index changed to \(selectedScope).") NSLog("The default search selected scope button index changed to \(selectedScope).")

View File

@ -9,11 +9,11 @@
import UIKit import UIKit
class DefaultToolbarViewController: UIViewController { class DefaultToolbarViewController: UIViewController {
// MARK: Properties // MARK: - Properties
@IBOutlet weak var toolbar: UIToolbar! @IBOutlet weak var toolbar: UIToolbar!
// MARK: View Life Cycle // MARK: - View Life Cycle
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
@ -21,7 +21,7 @@ class DefaultToolbarViewController: UIViewController {
configureToolbar() configureToolbar()
} }
// MARK: Configuration // MARK: - Configuration
func configureToolbar() { func configureToolbar() {
let toolbarButtonItems = [ let toolbarButtonItems = [
@ -33,7 +33,7 @@ class DefaultToolbarViewController: UIViewController {
toolbar.setItems(toolbarButtonItems, animated: true) toolbar.setItems(toolbarButtonItems, animated: true)
} }
// MARK: UIBarButtonItem Creation and Configuration // MARK: - UIBarButtonItem Creation and Configuration
var trashBarButtonItem: UIBarButtonItem { var trashBarButtonItem: UIBarButtonItem {
return UIBarButtonItem(barButtonSystemItem: .Trash, target: self, action: #selector(DefaultToolbarViewController.barButtonItemClicked(_:))) return UIBarButtonItem(barButtonSystemItem: .Trash, target: self, action: #selector(DefaultToolbarViewController.barButtonItemClicked(_:)))
@ -49,7 +49,7 @@ class DefaultToolbarViewController: UIViewController {
return UIBarButtonItem(title: customTitle, style: .Plain, target: self, action: #selector(DefaultToolbarViewController.barButtonItemClicked(_:))) return UIBarButtonItem(title: customTitle, style: .Plain, target: self, action: #selector(DefaultToolbarViewController.barButtonItemClicked(_:)))
} }
// MARK: Actions // MARK: - Actions
func barButtonItemClicked(barButtonItem: UIBarButtonItem) { func barButtonItemClicked(barButtonItem: UIBarButtonItem) {
NSLog("A bar button item on the default toolbar was clicked: \(barButtonItem).") NSLog("A bar button item on the default toolbar was clicked: \(barButtonItem).")

View File

@ -9,7 +9,7 @@
import UIKit import UIKit
class ImageViewController: UIViewController { class ImageViewController: UIViewController {
// MARK: View Life Cycle // MARK: - View Life Cycle
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
@ -17,7 +17,7 @@ class ImageViewController: UIViewController {
configureImageView() configureImageView()
} }
// MARK: Configuration // MARK: - Configuration
func configureImageView() { func configureImageView() {
// The root view of the view controller set in Interface Builder is a UIImageView. // The root view of the view controller set in Interface Builder is a UIImageView.

View File

@ -9,7 +9,7 @@
import UIKit import UIKit
class PageControlViewController: UIViewController { class PageControlViewController: UIViewController {
// MARK: Properties // MARK: - Properties
@IBOutlet weak var pageControl: UIPageControl! @IBOutlet weak var pageControl: UIPageControl!
@ -29,7 +29,7 @@ class PageControlViewController: UIViewController {
UIColor.purpleColor() UIColor.purpleColor()
] ]
// MARK: View Life Cycle // MARK: - View Life Cycle
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
@ -38,7 +38,7 @@ class PageControlViewController: UIViewController {
pageControlValueDidChange() pageControlValueDidChange()
} }
// MARK: Configuration // MARK: - Configuration
func configurePageControl() { func configurePageControl() {
// The total number of pages that are available is based on how many available colors we have. // The total number of pages that are available is based on how many available colors we have.
@ -52,7 +52,7 @@ class PageControlViewController: UIViewController {
pageControl.addTarget(self, action: #selector(PageControlViewController.pageControlValueDidChange), forControlEvents: .ValueChanged) pageControl.addTarget(self, action: #selector(PageControlViewController.pageControlValueDidChange), forControlEvents: .ValueChanged)
} }
// MARK: Actions // MARK: - Actions
func pageControlValueDidChange() { func pageControlValueDidChange() {
NSLog("The page control changed its current page to \(pageControl.currentPage).") NSLog("The page control changed its current page to \(pageControl.currentPage).")

View File

@ -9,7 +9,7 @@
import UIKit import UIKit
class PickerViewController: UIViewController, UIPickerViewDataSource, UIPickerViewDelegate, UIPickerViewAccessibilityDelegate { class PickerViewController: UIViewController, UIPickerViewDataSource, UIPickerViewDelegate, UIPickerViewAccessibilityDelegate {
// MARK: Types // MARK: - Types
enum ColorComponent: Int { enum ColorComponent: Int {
case Red = 0, Green, Blue case Red = 0, Green, Blue
@ -25,7 +25,7 @@ class PickerViewController: UIViewController, UIPickerViewDataSource, UIPickerVi
static let offset: CGFloat = 5.0 static let offset: CGFloat = 5.0
} }
// MARK: Properties // MARK: - Properties
@IBOutlet weak var pickerView: UIPickerView! @IBOutlet weak var pickerView: UIPickerView!
@ -51,7 +51,7 @@ class PickerViewController: UIViewController, UIPickerViewDataSource, UIPickerVi
} }
} }
// MARK: View Life Cycle // MARK: - View Life Cycle
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
@ -59,13 +59,13 @@ class PickerViewController: UIViewController, UIPickerViewDataSource, UIPickerVi
configurePickerView() configurePickerView()
} }
// MARK: Convenience // MARK: - Convenience
func updateColorSwatchViewBackgroundColor() { func updateColorSwatchViewBackgroundColor() {
colorSwatchView.backgroundColor = UIColor(red: redColor, green: greenColor, blue: blueColor, alpha: 1) colorSwatchView.backgroundColor = UIColor(red: redColor, green: greenColor, blue: blueColor, alpha: 1)
} }
// MARK: Configuration // MARK: - Configuration
func configurePickerView() { func configurePickerView() {
// Show that a given row is selected. This is off by default. // Show that a given row is selected. This is off by default.
@ -85,7 +85,7 @@ class PickerViewController: UIViewController, UIPickerViewDataSource, UIPickerVi
} }
} }
// MARK: UIPickerViewDataSource // MARK: - UIPickerViewDataSource
func numberOfComponentsInPickerView(pickerView: UIPickerView) -> Int { func numberOfComponentsInPickerView(pickerView: UIPickerView) -> Int {
return ColorComponent.count return ColorComponent.count
@ -95,7 +95,7 @@ class PickerViewController: UIViewController, UIPickerViewDataSource, UIPickerVi
return numberOfColorValuesPerComponent return numberOfColorValuesPerComponent
} }
// MARK: UIPickerViewDelegate // MARK: - UIPickerViewDelegate
func pickerView(pickerView: UIPickerView, attributedTitleForRow row: Int, forComponent component: Int) -> NSAttributedString? { func pickerView(pickerView: UIPickerView, attributedTitleForRow row: Int, forComponent component: Int) -> NSAttributedString? {
let colorValue = CGFloat(row) * RGB.offset let colorValue = CGFloat(row) * RGB.offset
@ -143,7 +143,7 @@ class PickerViewController: UIViewController, UIPickerViewDataSource, UIPickerVi
} }
} }
// MARK: UIPickerViewAccessibilityDelegate // MARK: - UIPickerViewAccessibilityDelegate
func pickerView(pickerView: UIPickerView, accessibilityLabelForComponent component: Int) -> String? { func pickerView(pickerView: UIPickerView, accessibilityLabelForComponent component: Int) -> String? {
switch ColorComponent(rawValue: component)! { switch ColorComponent(rawValue: component)! {

View File

@ -15,7 +15,7 @@ import UIKit
private var progressViewKVOContext = 0 private var progressViewKVOContext = 0
class ProgressViewController: UITableViewController { class ProgressViewController: UITableViewController {
// MARK: Properties // MARK: - Properties
@IBOutlet weak var defaultStyleProgressView: UIProgressView! @IBOutlet weak var defaultStyleProgressView: UIProgressView!
@ -37,7 +37,7 @@ class ProgressViewController: UITableViewController {
*/ */
private var updateTimer: NSTimer? private var updateTimer: NSTimer?
// MARK: Initialization // MARK: - Initialization
required init?(coder aDecoder: NSCoder) { required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder) super.init(coder: aDecoder)
@ -51,7 +51,7 @@ class ProgressViewController: UITableViewController {
progress.removeObserver(self, forKeyPath: "fractionCompleted") progress.removeObserver(self, forKeyPath: "fractionCompleted")
} }
// MARK: View Life Cycle // MARK: - View Life Cycle
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
@ -84,7 +84,7 @@ class ProgressViewController: UITableViewController {
updateTimer?.invalidate() updateTimer?.invalidate()
} }
// MARK: Key Value Observing (KVO) // MARK: - Key Value Observing (KVO)
override func observeValueForKeyPath(keyPath: String?, ofObject object: AnyObject?, change: [String: AnyObject]?, context: UnsafeMutablePointer<Void>) { override func observeValueForKeyPath(keyPath: String?, ofObject object: AnyObject?, change: [String: AnyObject]?, context: UnsafeMutablePointer<Void>) {
// Check if this is the KVO notification for our `NSProgress` object. // Check if this is the KVO notification for our `NSProgress` object.
@ -99,7 +99,7 @@ class ProgressViewController: UITableViewController {
} }
} }
// MARK: Configuration // MARK: - Configuration
func configureDefaultStyleProgressView() { func configureDefaultStyleProgressView() {
defaultStyleProgressView.progressViewStyle = .Default defaultStyleProgressView.progressViewStyle = .Default
@ -116,7 +116,7 @@ class ProgressViewController: UITableViewController {
tintedProgressView.progressTintColor = UIColor.applicationPurpleColor tintedProgressView.progressTintColor = UIColor.applicationPurpleColor
} }
// MARK: Timer // MARK: - Timer
func timerDidFire() { func timerDidFire() {
/* /*

View File

@ -9,12 +9,12 @@
import UIKit import UIKit
class SearchBarEmbeddedInNavigationBarViewController: SearchControllerBaseViewController { class SearchBarEmbeddedInNavigationBarViewController: SearchControllerBaseViewController {
// MARK: Properties // MARK: - Properties
// `searchController` is set in viewDidLoad(_:). // `searchController` is set in viewDidLoad(_:).
var searchController: UISearchController! var searchController: UISearchController!
// MARK: View Life Cycle // MARK: - View Life Cycle
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()

View File

@ -9,13 +9,13 @@
import UIKit import UIKit
class SearchControllerBaseViewController: UITableViewController { class SearchControllerBaseViewController: UITableViewController {
// MARK: Types // MARK: - Types
struct TableViewConstants { struct TableViewConstants {
static let tableViewCellIdentifier = "searchResultsCell" static let tableViewCellIdentifier = "searchResultsCell"
} }
// MARK: Properties // MARK: - Properties
let allResults = ["Here's", "to", "the", "crazy", "ones.", "The", "misfits.", "The", "rebels.", "The", "troublemakers.", "The", "round", "pegs", "in", "the", "square", "holes.", "The", "ones", "who", "see", "things", "differently.", "They're", "not", "fond", "of", "rules.", "And", "they", "have", "no", "respect", "for", "the", "status", "quo.", "You", "can", "quote", "them,", "disagree", "with", "them,", "glorify", "or", "vilify", "them.", "About", "the", "only", "thing", "you", "can't", "do", "is", "ignore", "them.", "Because", "they", "change", "things.", "They", "push", "the", "human", "race", "forward.", "And", "while", "some", "may", "see", "them", "as", "the", "crazy", "ones,", "we", "see", "genius.", "Because", "the", "people", "who", "are", "crazy", "enough", "to", "think", "they", "can", "change", "the", "world,", "are", "the", "ones", "who", "do."] let allResults = ["Here's", "to", "the", "crazy", "ones.", "The", "misfits.", "The", "rebels.", "The", "troublemakers.", "The", "round", "pegs", "in", "the", "square", "holes.", "The", "ones", "who", "see", "things", "differently.", "They're", "not", "fond", "of", "rules.", "And", "they", "have", "no", "respect", "for", "the", "status", "quo.", "You", "can", "quote", "them,", "disagree", "with", "them,", "glorify", "or", "vilify", "them.", "About", "the", "only", "thing", "you", "can't", "do", "is", "ignore", "them.", "Because", "they", "change", "things.", "They", "push", "the", "human", "race", "forward.", "And", "while", "some", "may", "see", "them", "as", "the", "crazy", "ones,", "we", "see", "genius.", "Because", "the", "people", "who", "are", "crazy", "enough", "to", "think", "they", "can", "change", "the", "world,", "are", "the", "ones", "who", "do."]
@ -38,7 +38,7 @@ class SearchControllerBaseViewController: UITableViewController {
} }
} }
// MARK: UITableViewDataSource // MARK: - UITableViewDataSource
override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return visibleResults.count return visibleResults.count

View File

@ -9,12 +9,12 @@
import UIKit import UIKit
class SearchPresentOverNavigationBarViewController: SearchControllerBaseViewController { class SearchPresentOverNavigationBarViewController: SearchControllerBaseViewController {
// MARK: Properties // MARK: - Properties
// `searchController` is set when the search button is clicked. // `searchController` is set when the search button is clicked.
var searchController: UISearchController! var searchController: UISearchController!
// MARK: Actions // MARK: - Actions
@IBAction func searchButtonClicked(button: UIBarButtonItem) { @IBAction func searchButtonClicked(button: UIBarButtonItem) {
// Create the search results view controller and use it for the `UISearchController`. // Create the search results view controller and use it for the `UISearchController`.

View File

@ -9,7 +9,7 @@
import UIKit import UIKit
class SearchResultsViewController: SearchControllerBaseViewController, UISearchResultsUpdating { class SearchResultsViewController: SearchControllerBaseViewController, UISearchResultsUpdating {
// MARK: Types // MARK: - Types
struct StoryboardConstants { struct StoryboardConstants {
/** /**
@ -19,7 +19,7 @@ class SearchResultsViewController: SearchControllerBaseViewController, UISearchR
static let identifier = "SearchResultsViewControllerStoryboardIdentifier" static let identifier = "SearchResultsViewControllerStoryboardIdentifier"
} }
// MARK: UISearchResultsUpdating // MARK: - UISearchResultsUpdating
func updateSearchResultsForSearchController(searchController: UISearchController) { func updateSearchResultsForSearchController(searchController: UISearchController) {
/* /*

View File

@ -9,12 +9,12 @@
import UIKit import UIKit
class SearchShowResultsInSourceViewController: SearchResultsViewController { class SearchShowResultsInSourceViewController: SearchResultsViewController {
// MARK: Properties // MARK: - Properties
// `searchController` is set in `viewDidLoad(_:)`. // `searchController` is set in `viewDidLoad(_:)`.
var searchController: UISearchController! var searchController: UISearchController!
// MARK: View Life Cycle // MARK: - View Life Cycle
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()

View File

@ -9,7 +9,7 @@
import UIKit import UIKit
class SegmentedControlViewController: UITableViewController { class SegmentedControlViewController: UITableViewController {
// MARK: Properties // MARK: - Properties
@IBOutlet weak var defaultSegmentedControl: UISegmentedControl! @IBOutlet weak var defaultSegmentedControl: UISegmentedControl!
@ -19,7 +19,7 @@ class SegmentedControlViewController: UITableViewController {
@IBOutlet weak var customBackgroundSegmentedControl: UISegmentedControl! @IBOutlet weak var customBackgroundSegmentedControl: UISegmentedControl!
// MARK: View Life Cycle // MARK: - View Life Cycle
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
@ -30,10 +30,9 @@ class SegmentedControlViewController: UITableViewController {
configureCustomBackgroundSegmentedControl() configureCustomBackgroundSegmentedControl()
} }
// MARK: Configuration // MARK: - Configuration
func configureDefaultSegmentedControl() { func configureDefaultSegmentedControl() {
defaultSegmentedControl.momentary = true
defaultSegmentedControl.setEnabled(false, forSegmentAtIndex: 0) defaultSegmentedControl.setEnabled(false, forSegmentAtIndex: 0)
@ -111,7 +110,7 @@ class SegmentedControlViewController: UITableViewController {
customBackgroundSegmentedControl.addTarget(self, action: #selector(SegmentedControlViewController.selectedSegmentDidChange(_:)), forControlEvents: .ValueChanged) customBackgroundSegmentedControl.addTarget(self, action: #selector(SegmentedControlViewController.selectedSegmentDidChange(_:)), forControlEvents: .ValueChanged)
} }
// MARK: Actions // MARK: - Actions
func selectedSegmentDidChange(segmentedControl: UISegmentedControl) { func selectedSegmentDidChange(segmentedControl: UISegmentedControl) {
NSLog("The selected segment changed for: \(segmentedControl).") NSLog("The selected segment changed for: \(segmentedControl).")

View File

@ -9,7 +9,7 @@
import UIKit import UIKit
class SliderViewController: UITableViewController { class SliderViewController: UITableViewController {
// MARK: Properties // MARK: - Properties
@IBOutlet weak var defaultSlider: UISlider! @IBOutlet weak var defaultSlider: UISlider!
@ -17,7 +17,7 @@ class SliderViewController: UITableViewController {
@IBOutlet weak var customSlider: UISlider! @IBOutlet weak var customSlider: UISlider!
// MARK: View Life Cycle // MARK: - View Life Cycle
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
@ -27,7 +27,7 @@ class SliderViewController: UITableViewController {
configureCustomSlider() configureCustomSlider()
} }
// MARK: Configuration // MARK: - Configuration
func configureDefaultSlider() { func configureDefaultSlider() {
defaultSlider.minimumValue = 0 defaultSlider.minimumValue = 0
@ -63,7 +63,7 @@ class SliderViewController: UITableViewController {
customSlider.addTarget(self, action: #selector(SliderViewController.sliderValueDidChange(_:)), forControlEvents: .ValueChanged) customSlider.addTarget(self, action: #selector(SliderViewController.sliderValueDidChange(_:)), forControlEvents: .ValueChanged)
} }
// MARK: Actions // MARK: - Actions
func sliderValueDidChange(slider: UISlider) { func sliderValueDidChange(slider: UISlider) {
NSLog("A slider changed its value: \(slider).") NSLog("A slider changed its value: \(slider).")

View File

@ -9,7 +9,7 @@
import UIKit import UIKit
class StackViewController: UIViewController { class StackViewController: UIViewController {
// MARK: Properties // MARK: - Properties
@IBOutlet var furtherDetailStackView: UIStackView! @IBOutlet var furtherDetailStackView: UIStackView!
@ -23,7 +23,7 @@ class StackViewController: UIViewController {
let maximumArrangedSubviewCount = 3 let maximumArrangedSubviewCount = 3
// MARK: View Life Cycle // MARK: - View Life Cycle
override func viewWillAppear(animated: Bool) { override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated) super.viewWillAppear(animated)
@ -33,7 +33,7 @@ class StackViewController: UIViewController {
updateAddRemoveButtons() updateAddRemoveButtons()
} }
// MARK: Actions // MARK: - Actions
@IBAction func showFurtherDetail(_: AnyObject) { @IBAction func showFurtherDetail(_: AnyObject) {
// Animate the changes by performing them in a `UIView` animation block. // Animate the changes by performing them in a `UIView` animation block.
@ -87,7 +87,7 @@ class StackViewController: UIViewController {
updateAddRemoveButtons() updateAddRemoveButtons()
} }
// MARK: Convenience // MARK: - Convenience
private func updateAddRemoveButtons() { private func updateAddRemoveButtons() {
let arrangedSubviewCount = addRemoveExampleStackView.arrangedSubviews.count let arrangedSubviewCount = addRemoveExampleStackView.arrangedSubviews.count

View File

@ -9,7 +9,7 @@
import UIKit import UIKit
class StepperViewController: UITableViewController { class StepperViewController: UITableViewController {
// MARK: Properties // MARK: - Properties
@IBOutlet weak var defaultStepper: UIStepper! @IBOutlet weak var defaultStepper: UIStepper!
@ -23,7 +23,7 @@ class StepperViewController: UITableViewController {
@IBOutlet weak var customStepperLabel: UILabel! @IBOutlet weak var customStepperLabel: UILabel!
// MARK: View Life Cycle // MARK: - View Life Cycle
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
@ -33,7 +33,7 @@ class StepperViewController: UITableViewController {
configureCustomStepper() configureCustomStepper()
} }
// MARK: Configuration // MARK: - Configuration
func configureDefaultStepper() { func configureDefaultStepper() {
defaultStepper.value = 0 defaultStepper.value = 0
@ -82,7 +82,7 @@ class StepperViewController: UITableViewController {
customStepper.addTarget(self, action: #selector(StepperViewController.stepperValueDidChange(_:)), forControlEvents: .ValueChanged) customStepper.addTarget(self, action: #selector(StepperViewController.stepperValueDidChange(_:)), forControlEvents: .ValueChanged)
} }
// MARK: Actions // MARK: - Actions
func stepperValueDidChange(stepper: UIStepper) { func stepperValueDidChange(stepper: UIStepper) {
NSLog("A stepper changed its value: \(stepper).") NSLog("A stepper changed its value: \(stepper).")

View File

@ -9,13 +9,13 @@
import UIKit import UIKit
class SwitchViewController: UITableViewController { class SwitchViewController: UITableViewController {
// MARK: Properties // MARK: - Properties
@IBOutlet weak var defaultSwitch: UISwitch! @IBOutlet weak var defaultSwitch: UISwitch!
@IBOutlet weak var tintedSwitch: UISwitch! @IBOutlet weak var tintedSwitch: UISwitch!
// MARK: View Life Cycle // MARK: - View Life Cycle
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
@ -24,7 +24,7 @@ class SwitchViewController: UITableViewController {
configureTintedSwitch() configureTintedSwitch()
} }
// MARK: Configuration // MARK: - Configuration
func configureDefaultSwitch() { func configureDefaultSwitch() {
defaultSwitch.setOn(true, animated: false) defaultSwitch.setOn(true, animated: false)
@ -40,7 +40,7 @@ class SwitchViewController: UITableViewController {
tintedSwitch.addTarget(self, action: #selector(SwitchViewController.switchValueDidChange(_:)), forControlEvents: .ValueChanged) tintedSwitch.addTarget(self, action: #selector(SwitchViewController.switchValueDidChange(_:)), forControlEvents: .ValueChanged)
} }
// MARK: Actions // MARK: - Actions
func switchValueDidChange(aSwitch: UISwitch) { func switchValueDidChange(aSwitch: UISwitch) {
NSLog("A switch changed its value: \(aSwitch).") NSLog("A switch changed its value: \(aSwitch).")

View File

@ -9,7 +9,7 @@
import UIKit import UIKit
class TextFieldViewController: UITableViewController, UITextFieldDelegate { class TextFieldViewController: UITableViewController, UITextFieldDelegate {
// MARK: Properties // MARK: - Properties
@IBOutlet weak var textField: UITextField! @IBOutlet weak var textField: UITextField!
@ -33,28 +33,7 @@ class TextFieldViewController: UITableViewController, UITextFieldDelegate {
configureCustomTextField() configureCustomTextField()
} }
override func viewWillAppear(animated: Bool) { // MARK: - Configuration
super.viewWillAppear(animated)
// Listen for changes to keyboard visibility so that we can adjust the text view accordingly.
let notificationCenter = NSNotificationCenter.defaultCenter()
notificationCenter.addObserver(self, selector: #selector(TextFieldViewController.handleKeyboardNotification(_:)), name: UIKeyboardWillShowNotification, object: nil)
notificationCenter.addObserver(self, selector: #selector(TextFieldViewController.handleKeyboardNotification(_:)), name: UIKeyboardWillHideNotification, object: nil)
}
override func viewDidDisappear(animated: Bool) {
super.viewDidDisappear(animated)
let notificationCenter = NSNotificationCenter.defaultCenter()
notificationCenter.removeObserver(self, name: UIKeyboardWillShowNotification, object: nil)
notificationCenter.removeObserver(self, name: UIKeyboardWillHideNotification, object: nil)
}
// MARK: Configuration
func configureTextField() { func configureTextField() {
textField.placeholder = NSLocalizedString("Placeholder text", comment: "") textField.placeholder = NSLocalizedString("Placeholder text", comment: "")
@ -122,7 +101,7 @@ class TextFieldViewController: UITableViewController, UITextFieldDelegate {
customTextField.returnKeyType = .Done customTextField.returnKeyType = .Done
} }
// MARK: UITextFieldDelegate // MARK: - UITextFieldDelegate
func textFieldShouldReturn(textField: UITextField) -> Bool { func textFieldShouldReturn(textField: UITextField) -> Bool {
textField.resignFirstResponder() textField.resignFirstResponder()
@ -130,42 +109,7 @@ class TextFieldViewController: UITableViewController, UITextFieldDelegate {
return true return true
} }
// MARK: Keyboard Event Notifications // MARK: - Actions
func handleKeyboardNotification(notification: NSNotification) {
let userInfo = notification.userInfo!
// Get information about the animation.
let animationDuration: NSTimeInterval = (userInfo[UIKeyboardAnimationDurationUserInfoKey] as! NSNumber).doubleValue
let rawAnimationCurveValue = (userInfo[UIKeyboardAnimationDurationUserInfoKey] as! NSNumber).unsignedLongValue
let animationCurve = UIViewAnimationOptions(rawValue: rawAnimationCurveValue)
// Convert the keyboard frame from screen to view coordinates.
let keyboardScreenBeginFrame = (userInfo[UIKeyboardFrameBeginUserInfoKey] as! NSValue).CGRectValue()
let keyboardScreenEndFrame = (userInfo[UIKeyboardFrameEndUserInfoKey] as! NSValue).CGRectValue()
let keyboardViewBeginFrame = view.convertRect(keyboardScreenBeginFrame, fromView: view.window)
let keyboardViewEndFrame = view.convertRect(keyboardScreenEndFrame, fromView: view.window)
// Determine how far the keyboard has moved up or down.
let originDelta = keyboardViewEndFrame.origin.y - keyboardViewBeginFrame.origin.y
// Adjust the table view's scroll indicator and content insets.
tableView.scrollIndicatorInsets.bottom -= originDelta
tableView.contentInset.bottom -= originDelta
// Inform the view that its the layout should be updated.
tableView.setNeedsLayout()
// Animate updating the view's layout by calling layoutIfNeeded inside a UIView animation block.
let animationOptions: UIViewAnimationOptions = [animationCurve, .BeginFromCurrentState]
UIView.animateWithDuration(animationDuration, delay: 0, options: animationOptions, animations: {
self.view.layoutIfNeeded()
}, completion: nil)
}
// MARK: Actions
func customTextFieldPurpleButtonClicked() { func customTextFieldPurpleButtonClicked() {
customTextField.textColor = UIColor.applicationPurpleColor customTextField.textColor = UIColor.applicationPurpleColor

View File

@ -9,14 +9,14 @@
import UIKit import UIKit
class TextViewController: UIViewController, UITextViewDelegate { class TextViewController: UIViewController, UITextViewDelegate {
// MARK: Properties // MARK: - Properties
@IBOutlet weak var textView: UITextView! @IBOutlet weak var textView: UITextView!
/// Used to adjust the text view's height when the keyboard hides and shows. /// Used to adjust the text view's height when the keyboard hides and shows.
@IBOutlet weak var textViewBottomLayoutGuideConstraint: NSLayoutConstraint! @IBOutlet weak var textViewBottomLayoutGuideConstraint: NSLayoutConstraint!
// MARK: View Life Cycle // MARK: - View Life Cycle
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
@ -45,7 +45,7 @@ class TextViewController: UIViewController, UITextViewDelegate {
notificationCenter.removeObserver(self, name: UIKeyboardWillHideNotification, object: nil) notificationCenter.removeObserver(self, name: UIKeyboardWillHideNotification, object: nil)
} }
// MARK: Keyboard Event Notifications // MARK: - Keyboard Event Notifications
func handleKeyboardNotification(notification: NSNotification) { func handleKeyboardNotification(notification: NSNotification) {
let userInfo = notification.userInfo! let userInfo = notification.userInfo!
@ -81,12 +81,13 @@ class TextViewController: UIViewController, UITextViewDelegate {
textView.scrollRangeToVisible(selectedRange) textView.scrollRangeToVisible(selectedRange)
} }
// MARK: Configuration // MARK: - Configuration
func configureTextView() { func configureTextView() {
let bodyFontDescriptor = UIFontDescriptor.preferredFontDescriptorWithTextStyle(UIFontTextStyleBody) let bodyFontDescriptor = UIFontDescriptor.preferredFontDescriptorWithTextStyle(UIFontTextStyleBody)
textView.font = UIFont(descriptor: bodyFontDescriptor, size: 0) let bodyFont = UIFont(descriptor: bodyFontDescriptor, size: 0)
textView.font = bodyFont
textView.textColor = UIColor.blackColor() textView.textColor = UIColor.blackColor()
textView.backgroundColor = UIColor.whiteColor() textView.backgroundColor = UIColor.whiteColor()
textView.scrollEnabled = true textView.scrollEnabled = true
@ -116,7 +117,7 @@ class TextViewController: UIViewController, UITextViewDelegate {
with an additional bold trait. with an additional bold trait.
*/ */
let boldFontDescriptor = textView.font!.fontDescriptor().fontDescriptorWithSymbolicTraits(.TraitBold) let boldFontDescriptor = textView.font!.fontDescriptor().fontDescriptorWithSymbolicTraits(.TraitBold)
let boldFont = UIFont(descriptor: boldFontDescriptor, size: 0) let boldFont = UIFont(descriptor: boldFontDescriptor!, size: 0)
attributedText.addAttribute(NSFontAttributeName, value: boldFont, range: boldRange) attributedText.addAttribute(NSFontAttributeName, value: boldFont, range: boldRange)
// Add highlight. // Add highlight.
@ -137,10 +138,15 @@ class TextViewController: UIViewController, UITextViewDelegate {
let textAttachmentString = NSAttributedString(attachment: textAttachment) let textAttachmentString = NSAttributedString(attachment: textAttachment)
attributedText.appendAttributedString(textAttachmentString) attributedText.appendAttributedString(textAttachmentString)
// Append a space with matching font of the rest of the body text.
let appendedSpace = NSMutableAttributedString.init(string: " ")
appendedSpace.addAttribute(NSFontAttributeName, value: bodyFont, range: NSMakeRange(0, 1))
attributedText.appendAttributedString(appendedSpace)
textView.attributedText = attributedText textView.attributedText = attributedText
} }
// MARK: UITextViewDelegate // MARK: - UITextViewDelegate
func textViewDidBeginEditing(textView: UITextView) { func textViewDidBeginEditing(textView: UITextView) {
/* /*
@ -152,7 +158,7 @@ class TextViewController: UIViewController, UITextViewDelegate {
navigationItem.setRightBarButtonItem(doneBarButtonItem, animated: true) navigationItem.setRightBarButtonItem(doneBarButtonItem, animated: true)
} }
// MARK: Actions // MARK: - Actions
func doneBarButtonItemClicked() { func doneBarButtonItemClicked() {
// Dismiss the keyboard by removing it as the first responder. // Dismiss the keyboard by removing it as the first responder.

View File

@ -9,11 +9,11 @@
import UIKit import UIKit
class TintedToolbarViewController: UIViewController { class TintedToolbarViewController: UIViewController {
// MARK: Properties // MARK: - Properties
@IBOutlet weak var toolbar: UIToolbar! @IBOutlet weak var toolbar: UIToolbar!
// MARK: View Life Cycle // MARK: - View Life Cycle
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
@ -21,7 +21,7 @@ class TintedToolbarViewController: UIViewController {
configureToolbar() configureToolbar()
} }
// MARK: Configuration // MARK: - Configuration
func configureToolbar() { func configureToolbar() {
// See the `UIBarStyle` enum for more styles, including `.Default`. // See the `UIBarStyle` enum for more styles, including `.Default`.
@ -39,7 +39,7 @@ class TintedToolbarViewController: UIViewController {
toolbar.setItems(toolbarButtonItems, animated: true) toolbar.setItems(toolbarButtonItems, animated: true)
} }
// MARK: UIBarButtonItem Creation and Configuration // MARK: - UIBarButtonItem Creation and Configuration
var refreshBarButtonItem: UIBarButtonItem { var refreshBarButtonItem: UIBarButtonItem {
return UIBarButtonItem(barButtonSystemItem: .Refresh, target: self, action: #selector(TintedToolbarViewController.barButtonItemClicked(_:))) return UIBarButtonItem(barButtonSystemItem: .Refresh, target: self, action: #selector(TintedToolbarViewController.barButtonItemClicked(_:)))
@ -54,7 +54,7 @@ class TintedToolbarViewController: UIViewController {
return UIBarButtonItem(barButtonSystemItem: .Action, target: self, action: #selector(TintedToolbarViewController.barButtonItemClicked(_:))) return UIBarButtonItem(barButtonSystemItem: .Action, target: self, action: #selector(TintedToolbarViewController.barButtonItemClicked(_:)))
} }
// MARK: Actions // MARK: - Actions
func barButtonItemClicked(barButtonItem: UIBarButtonItem) { func barButtonItemClicked(barButtonItem: UIBarButtonItem) {
NSLog("A bar button item on the tinted toolbar was clicked: \(barButtonItem).") NSLog("A bar button item on the tinted toolbar was clicked: \(barButtonItem).")

View File

@ -39,6 +39,7 @@
<string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string> <string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array> </array>
<key>UISupportedInterfaceOrientations~ipad</key> <key>UISupportedInterfaceOrientations~ipad</key>
<array> <array>

View File

@ -9,13 +9,13 @@
import UIKit import UIKit
class WebViewController: UIViewController, UIWebViewDelegate, UITextFieldDelegate { class WebViewController: UIViewController, UIWebViewDelegate, UITextFieldDelegate {
// MARK: Properties // MARK: - Properties
@IBOutlet weak var webView: UIWebView! @IBOutlet weak var webView: UIWebView!
@IBOutlet weak var addressTextField: UITextField! @IBOutlet weak var addressTextField: UITextField!
// MARK: View Life Cycle // MARK: - View Life Cycle
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
@ -30,7 +30,7 @@ class WebViewController: UIViewController, UIWebViewDelegate, UITextFieldDelegat
UIApplication.sharedApplication().networkActivityIndicatorVisible = false UIApplication.sharedApplication().networkActivityIndicatorVisible = false
} }
// MARK: Convenience // MARK: - Convenience
func loadAddressURL() { func loadAddressURL() {
if let text = addressTextField.text, requestURL = NSURL(string: text) { if let text = addressTextField.text, requestURL = NSURL(string: text) {
@ -39,7 +39,7 @@ class WebViewController: UIViewController, UIWebViewDelegate, UITextFieldDelegat
} }
} }
// MARK: Configuration // MARK: - Configuration
func configureWebView() { func configureWebView() {
webView.backgroundColor = UIColor.whiteColor() webView.backgroundColor = UIColor.whiteColor()
@ -47,7 +47,7 @@ class WebViewController: UIViewController, UIWebViewDelegate, UITextFieldDelegat
webView.dataDetectorTypes = .All webView.dataDetectorTypes = .All
} }
// MARK: UIWebViewDelegate // MARK: - UIWebViewDelegate
func webViewDidStartLoad(webView: UIWebView) { func webViewDidStartLoad(webView: UIWebView) {
UIApplication.sharedApplication().networkActivityIndicatorVisible = true UIApplication.sharedApplication().networkActivityIndicatorVisible = true
@ -57,18 +57,18 @@ class WebViewController: UIViewController, UIWebViewDelegate, UITextFieldDelegat
UIApplication.sharedApplication().networkActivityIndicatorVisible = false UIApplication.sharedApplication().networkActivityIndicatorVisible = false
} }
func webView(webView: UIWebView, didFailLoadWithError error: NSError?) { func webView(webView: UIWebView, didFailLoadWithError error: NSError) {
// Report the error inside the web view. // Report the error inside the web view.
let localizedErrorMessage = NSLocalizedString("An error occured:", comment: "") let localizedErrorMessage = NSLocalizedString("An error occured:", comment: "")
let errorHTML = "<!doctype html><html><body><div style=\"width: 100%%; text-align: center; font-size: 36pt;\">\(localizedErrorMessage) \(error?.localizedDescription)</div></body></html>" let errorHTML = "<!doctype html><html><body><div style=\"width: 100%%; text-align: center; font-size: 36pt;\">\(localizedErrorMessage) \(error.localizedDescription)</div></body></html>"
webView.loadHTMLString(errorHTML, baseURL: nil) webView.loadHTMLString(errorHTML, baseURL: nil)
UIApplication.sharedApplication().networkActivityIndicatorVisible = false UIApplication.sharedApplication().networkActivityIndicatorVisible = false
} }
// MARK: UITextFieldDelegate // MARK: - UITextFieldDelegate
/// Dismisses the keyboard when the "Done" button is clicked. /// Dismisses the keyboard when the "Done" button is clicked.
func textFieldShouldReturn(textField: UITextField) -> Bool { func textFieldShouldReturn(textField: UITextField) -> Bool {