Upgrade to iOS 15, added button configurations, UIVisualEffectView, UIToolTipInteraction, Pointer style buttons, SF Symbols
|
|
@ -1,4 +1,4 @@
|
|||
Copyright © 2020 Apple Inc.
|
||||
Copyright © 2021 Apple Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
|
|
|||
184
README.md
|
|
@ -4,80 +4,75 @@ Customize your app's user interface with views and controls.
|
|||
|
||||
## Overview
|
||||
|
||||
This sample guides you through several types of customizations you can make in your iOS app. The sample uses a split-view controller architecture for navigating UIKit views and controls. The primary view controller (`MasterViewController`) shows the available views and controls. When you select one, `MasterViewController` shows the secondary view controller associated with it.
|
||||
This sample guides you through several types of customizations you can make in your iOS app. It is built with Mac Catalyst, which means the sample runs on both iOS and macOS. The sample uses a split-view controller architecture to navigate UIKit views and controls. The primary view controller (`OutlineViewController`) shows the available views and controls. When you select one, `OutlineViewController` shows the secondary view controller associated with it.
|
||||
|
||||
The name of each secondary view controller reflects its *target item*. For example, the `AlertControllerViewController` class shows how to use a `UIAlertController` object. The only exceptions to this rule are `UISearchBar` and `UIToolbar`; the sample demonstrates these APIs in multiple view controllers to explain how their controls function and how to customize them. To demonstrate how to manage the complexity of your storyboards, the app hosts all view controllers in a separate storyboard and loaded when needed.
|
||||
The name of each secondary view controller reflects its target item. For example, the `AlertControllerViewController` class shows how to use a `UIAlertController` object. The only exceptions to this rule are `UISearchBar` and `UIToolbar`; the sample demonstrates these APIs in multiple view controllers to explain how their controls function and how to customize them. To demonstrate how to manage the complexity of your storyboards, the app hosts all view controllers in a separate storyboard and loads each as it's when needed.
|
||||
|
||||
This sample demonstrates the following views and controls (several of which are referenced in the sections below):
|
||||
This sample demonstrates the following views and controls; several of which are referenced in the sections below:
|
||||
|
||||
* [`UIActivityIndicatorView`](https://developer.apple.com/documentation/uikit/uiactivityindicatorview)
|
||||
* [`UIAlertController`](https://developer.apple.com/documentation/uikit/uialertcontroller)
|
||||
* [`UIButton`](https://developer.apple.com/documentation/uikit/uibutton)
|
||||
* [`UIDatePicker`](https://developer.apple.com/documentation/uikit/uidatepicker)
|
||||
* [`UIPickerView`](https://developer.apple.com/documentation/uikit/uipickerview)
|
||||
* [`UIColorPickerViewController`](https://developer.apple.com/documentation/uikit/uicolorpickerviewcontroller)
|
||||
* [`UIColorWell`](https://developer.apple.com/documentation/uikit/uicolorwell)
|
||||
* [`UIFontPickerViewController`](https://developer.apple.com/documentation/uikit/uifontpickerviewcontroller)
|
||||
* [`UIImagePickerViewController`](https://developer.apple.com/documentation/uikit/uiimagepickercontroller)
|
||||
* [`UIImageView`](https://developer.apple.com/documentation/uikit/uiimageview)
|
||||
* [`UIPageControl`](https://developer.apple.com/documentation/uikit/uipagecontrol)
|
||||
* [`UIProgressView`](https://developer.apple.com/documentation/uikit/uiprogressview)
|
||||
* [`UISearchBar`](https://developer.apple.com/documentation/uikit/uisearchbar)
|
||||
* [`UISegmentedControl`](https://developer.apple.com/documentation/uikit/uisegmentedcontrol)
|
||||
* [`UISlider`](https://developer.apple.com/documentation/uikit/uislider)
|
||||
* [`UIStackView`](https://developer.apple.com/documentation/uikit/uistackview)
|
||||
* [`UIStepper`](https://developer.apple.com/documentation/uikit/uistepper)
|
||||
* [`UISwitch`](https://developer.apple.com/documentation/uikit/uiswitch)
|
||||
* [`UITextField`](https://developer.apple.com/documentation/uikit/uitextfield)
|
||||
* [`UITextFormattingCoordinator`](https://developer.apple.com/documentation/uikit/uitextformattingcoordinator)
|
||||
* [`UITextView`](https://developer.apple.com/documentation/uikit/uitextview)
|
||||
* [`UIToolbar`](https://developer.apple.com/documentation/uikit/uitoolbar)
|
||||
* [`WKWebView`](https://developer.apple.com/documentation/webkit/wkwebview)
|
||||
* [UIActivityIndicatorView](https://developer.apple.com/documentation/uikit/uiactivityindicatorview)
|
||||
* [UIAlertController](https://developer.apple.com/documentation/uikit/uialertcontroller)
|
||||
* [UIButton](https://developer.apple.com/documentation/uikit/uibutton)
|
||||
* [UIButton - PointerStyleProvider](https://developer.apple.com/documentation/uikit/uibutton/pointerstyleprovider)
|
||||
* [UIDatePicker](https://developer.apple.com/documentation/uikit/uidatepicker)
|
||||
* [UIPickerView](https://developer.apple.com/documentation/uikit/uipickerview)
|
||||
* [UIColorPickerViewController](https://developer.apple.com/documentation/uikit/uicolorpickerviewcontroller)
|
||||
* [UIColorWell](https://developer.apple.com/documentation/uikit/uicolorwell)
|
||||
* [UIFontPickerViewController](https://developer.apple.com/documentation/uikit/uifontpickerviewcontroller)
|
||||
* [UIImagePickerViewController](https://developer.apple.com/documentation/uikit/uiimagepickercontroller)
|
||||
* [UIImageView](https://developer.apple.com/documentation/uikit/uiimageview)
|
||||
* [UIImageView with SF Symbols](https://developer.apple.com/design/human-interface-guidelines/sf-symbols/overview)
|
||||
* [UIPageControl](https://developer.apple.com/documentation/uikit/uipagecontrol)
|
||||
* [UIProgressView](https://developer.apple.com/documentation/uikit/uiprogressview)
|
||||
* [UISearchBar](https://developer.apple.com/documentation/uikit/uisearchbar)
|
||||
* [UISegmentedControl](https://developer.apple.com/documentation/uikit/uisegmentedcontrol)
|
||||
* [UISlider](https://developer.apple.com/documentation/uikit/uislider)
|
||||
* [UIStackView](https://developer.apple.com/documentation/uikit/uistackview)
|
||||
* [UIStepper](https://developer.apple.com/documentation/uikit/uistepper)
|
||||
* [UISwitch](https://developer.apple.com/documentation/uikit/uiswitch)
|
||||
* [UITextField](https://developer.apple.com/documentation/uikit/uitextfield)
|
||||
* [UITextFormattingCoordinator](https://developer.apple.com/documentation/uikit/uitextformattingcoordinator)
|
||||
* [UITextView](https://developer.apple.com/documentation/uikit/uitextview)
|
||||
* [UIToolbar](https://developer.apple.com/documentation/uikit/uitoolbar)
|
||||
* [UIVisualEffectView](https://developer.apple.com/documentation/uikit/uivisualeffect)
|
||||
* [WKWebView](https://developer.apple.com/documentation/webkit/wkwebview)
|
||||
|
||||
## Add Accessibility Support to Your Views
|
||||
## Configure the Sample Code Project
|
||||
|
||||
VoiceOver and other system accessibility technologies use the information provided by views and controls to help all users navigate content. UIKit views include default accessibility support. Improve user experience by providing custom accessibility information.
|
||||
In Xcode, select your development team on the iOS-Mac target's Signing and Capabilities tab.
|
||||
|
||||
In this UIKitCatalog sample, several view controllers configure the `accessibilityType` and `accessibilityLabel` properties of their associated view. Picker view columns don't have labels, so the picker view asks its delegate for the corresponding accessibility information:
|
||||
## Customize the Look of Buttons with Button Configurations
|
||||
|
||||
You can customize the appearance and behavior of a UIButton by using `UIButton.Configuration`. This sample uses a `filled()` configuration so that the button draws with a red background color:
|
||||
|
||||
``` swift
|
||||
func pickerView(_ pickerView: UIPickerView, accessibilityLabelForComponent component: Int) -> String? {
|
||||
|
||||
switch ColorComponent(rawValue: component)! {
|
||||
case .red:
|
||||
return NSLocalizedString("Red color component value", comment: "")
|
||||
|
||||
case .green:
|
||||
return NSLocalizedString("Green color component value", comment: "")
|
||||
|
||||
case .blue:
|
||||
return NSLocalizedString("Blue color component value", comment: "")
|
||||
}
|
||||
}
|
||||
var config = UIButton.Configuration.filled()
|
||||
config.background.backgroundColor = .systemRed
|
||||
button.configuration = config
|
||||
```
|
||||
|
||||
## Display a Custom Alert
|
||||
|
||||
`AlertControllerViewController` demonstrates several techniques for displaying modal alerts and action sheets from an interface. The configuration process is similar for all alerts:
|
||||
`AlertControllerViewController` demonstrates several techniques to display modal alerts and action sheets from an interface. The configuration process is similar for all alerts:
|
||||
|
||||
1. Determine the message you want to display in the alert.
|
||||
1. Determine the message to display in the alert.
|
||||
2. Create and configure a `UIAlertController` object.
|
||||
3. Add handlers for actions the user may take.
|
||||
4. Present the alert controller.
|
||||
|
||||
The `showSimpleAlert` function uses the `NSLocalizedString` function to retrieve the alert messages in the user’s preferred language. The `showSimpleAlert` function uses those strings to create and configure the `UIAlertController` object. Although the button in the alert has the title OK, the sample uses a cancel action to ensure the alert controller applies the proper styling to the button:
|
||||
The `showSimpleAlert` function uses the `NSLocalizedString` function to retrieve the alert messages in the user’s preferred language. The `showSimpleAlert` function uses those strings to create and configure the `UIAlertController` object. Although the button in the alert has the title OK, the sample uses a cancel action to ensure that the alert controller applies the proper styling to the button:
|
||||
|
||||
``` swift
|
||||
func showSimpleAlert() {
|
||||
let title = NSLocalizedString("A Short Title is Best", comment: "")
|
||||
let message = NSLocalizedString("A message should be a short, complete sentence.", comment: "")
|
||||
let message = NSLocalizedString("A message needs to be a short, complete sentence.", comment: "")
|
||||
let cancelButtonTitle = NSLocalizedString("OK", comment: "")
|
||||
|
||||
let alertController = UIAlertController(title: title, message: message, preferredStyle: .alert)
|
||||
|
||||
// Create the action.
|
||||
let cancelAction = UIAlertAction(title: cancelButtonTitle, style: .cancel) { _ in
|
||||
print("The simple alert's cancel action occurred.")
|
||||
Swift.debugPrint("The simple alert's cancel action occurred.")
|
||||
}
|
||||
|
||||
// Add the action.
|
||||
|
|
@ -89,31 +84,50 @@ func showSimpleAlert() {
|
|||
|
||||
## Customize the Appearance of Sliders
|
||||
|
||||
This sample demonstrates different ways to display a `UISlider`, a control you use to select a single value from a continuous range of values. Customize the appearance of a slider by assigning stretchable images for left-side tracking, right-side tracking, and the thumb. In this example, the track image is stretchable and is one pixel wide. Make the track images wider to provide rounded corners, but be sure to set these images' `capInsets` property to allow for the corners.
|
||||
This sample demonstrates different ways to display a `UISlider`, a control to select a single value from a continuous range of values. Customize the appearance of a slider by assigning stretchable images for left-side tracking, right-side tracking, and the thumb. In this example, the track image is stretchable and is one pixel wide. Make the track images wider to provide rounded corners, but be sure to set these images' `capInsets` property to allow for the corners.
|
||||
|
||||
The `configureCustomSlider` function sets up a custom slider:
|
||||
|
||||
``` swift
|
||||
func configureCustomSlider() {
|
||||
@available(iOS 15.0, *)
|
||||
func configureCustomSlider(slider: UISlider) {
|
||||
/** To keep the look the same betwen iOS and macOS:
|
||||
For setMinimumTrackImage, setMaximumTrackImage, setThumbImage to work in Mac Catalyst, use UIBehavioralStyle as ".pad",
|
||||
Available in macOS 12 or later (Mac Catalyst 15.0 or later).
|
||||
Use this for controls that need to look the same between iOS and macOS.
|
||||
*/
|
||||
if traitCollection.userInterfaceIdiom == .mac {
|
||||
slider.preferredBehavioralStyle = .pad
|
||||
}
|
||||
|
||||
let leftTrackImage = UIImage(named: "slider_blue_track")
|
||||
customSlider.setMinimumTrackImage(leftTrackImage, for: .normal)
|
||||
slider.setMinimumTrackImage(leftTrackImage, for: .normal)
|
||||
|
||||
let rightTrackImage = UIImage(named: "slider_green_track")
|
||||
customSlider.setMaximumTrackImage(rightTrackImage, for: .normal)
|
||||
slider.setMaximumTrackImage(rightTrackImage, for: .normal)
|
||||
|
||||
// Set the sliding thumb image (normal and highlighted).
|
||||
let thumbImageConfig = UIImage.SymbolConfiguration(scale: .large)
|
||||
//
|
||||
// For fun, choose a different image symbol configuraton for the thumb's image between macOS and iOS.
|
||||
var thumbImageConfig: UIImage.SymbolConfiguration
|
||||
if slider.traitCollection.userInterfaceIdiom == .mac {
|
||||
thumbImageConfig = UIImage.SymbolConfiguration(scale: .large)
|
||||
} else {
|
||||
thumbImageConfig = UIImage.SymbolConfiguration(pointSize: 30, weight: .heavy, scale: .large)
|
||||
}
|
||||
let thumbImage = UIImage(systemName: "circle.fill", withConfiguration: thumbImageConfig)
|
||||
customSlider.setThumbImage(thumbImage, for: .normal)
|
||||
slider.setThumbImage(thumbImage, for: .normal)
|
||||
|
||||
let thumbImageHighlighted = UIImage(systemName: "circle", withConfiguration: thumbImageConfig)
|
||||
customSlider.setThumbImage(thumbImageHighlighted, for: .highlighted)
|
||||
slider.setThumbImage(thumbImageHighlighted, for: .highlighted)
|
||||
|
||||
customSlider.minimumValue = 0
|
||||
customSlider.maximumValue = 100
|
||||
customSlider.isContinuous = false
|
||||
customSlider.value = 84
|
||||
// Set the rest of the slider's attributes.
|
||||
slider.minimumValue = 0
|
||||
slider.maximumValue = 100
|
||||
slider.isContinuous = false
|
||||
slider.value = 84
|
||||
|
||||
customSlider.addTarget(self, action: #selector(SliderViewController.sliderValueDidChange(_:)), for: .valueChanged)
|
||||
slider.addTarget(self, action: #selector(SliderViewController.sliderValueDidChange(_:)), for: .valueChanged)
|
||||
}
|
||||
```
|
||||
|
||||
|
|
@ -193,7 +207,7 @@ override func viewDidLoad() {
|
|||
|
||||
## Add a Page Control Interface
|
||||
|
||||
Use a `UIPageControl` to structure an app's user interface. A page control is a specialized control that displays a horizontal series of dots, each of which corresponds to a page in the app’s document or other data-model entity. Customize a page control by setting its tint color for all the page-indicator dots, and for the current page-indicator dot.
|
||||
Use a `UIPageControl` to structure an app's user interface. A *page control* is a specialized control that displays a horizontal series of dots, each of which corresponds to a page in the app’s document or other data-model entity. Customize a page control by setting its tint color for all the page-indicator dots, and for the current page-indicator dot.
|
||||
|
||||
The `configurePageControl` function sets up a customized page control:
|
||||
|
||||
|
|
@ -210,23 +224,23 @@ func configurePageControl() {
|
|||
}
|
||||
```
|
||||
|
||||
## Add Menus to Your Controls
|
||||
## Add Menus to Controls
|
||||
|
||||
Attach menus to controls like `UIButton` and `UIBarButtonItem`. Create menus with the [`UIAction`](https://developer.apple.com/documentation/uikit/uiaction) class, and attach a menu to each control by setting the [`UIMenu`](https://developer.apple.com/documentation/uikit/uimenu) property.
|
||||
|
||||
Attach a menu to a `UIButton` as shown here:
|
||||
|
||||
``` swift
|
||||
func configureMenuButton() {
|
||||
let buttonTitle = NSLocalizedString("Button", comment: "")
|
||||
menuButton.setTitle(buttonTitle, for: .normal)
|
||||
button.menu = UIMenu(children: [
|
||||
UIAction(title: String(format: NSLocalizedString("ItemTitle", comment: ""), "1"),
|
||||
identifier: UIAction.Identifier(ButtonMenuActionIdentifiers.item1.rawValue),
|
||||
handler: menuHandler),
|
||||
UIAction(title: String(format: NSLocalizedString("ItemTitle", comment: ""), "2"),
|
||||
identifier: UIAction.Identifier(ButtonMenuActionIdentifiers.item2.rawValue),
|
||||
handler: menuHandler)
|
||||
])
|
||||
|
||||
let items = (1...5).map {
|
||||
UIAction(title: String(format: NSLocalizedString("ItemTitle", comment: ""), $0.description), handler: menuHandler)
|
||||
}
|
||||
menuButton.menu = UIMenu(title: NSLocalizedString("ChooseItemTitle", comment: ""), children: items)
|
||||
menuButton.showsMenuAsPrimaryAction = true
|
||||
}
|
||||
button.showsMenuAsPrimaryAction = true
|
||||
```
|
||||
|
||||
Create a `UIBarButtonItem` with a menu attached as shown here:
|
||||
|
|
@ -241,14 +255,36 @@ var customTitleBarButtonItem: UIBarButtonItem {
|
|||
}
|
||||
```
|
||||
|
||||
## Add Accessibility Support to Your Views
|
||||
|
||||
VoiceOver and other system accessibility technologies use the information provided by views and controls to help all users navigate content. UIKit views include default accessibility support. Improve user experience by providing custom accessibility information.
|
||||
|
||||
In this UIKitCatalog sample, several view controllers configure the `accessibilityType` and `accessibilityLabel` properties of their associated view. Picker view columns don't have labels, so the picker view asks its delegate for the corresponding accessibility information:
|
||||
|
||||
``` swift
|
||||
func pickerView(_ pickerView: UIPickerView, accessibilityLabelForComponent component: Int) -> String? {
|
||||
|
||||
switch ColorComponent(rawValue: component)! {
|
||||
case .red:
|
||||
return NSLocalizedString("Red color component value", comment: "")
|
||||
|
||||
case .green:
|
||||
return NSLocalizedString("Green color component value", comment: "")
|
||||
|
||||
case .blue:
|
||||
return NSLocalizedString("Blue color component value", comment: "")
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Support Mac Catalyst
|
||||
|
||||
This sample app is built with Mac Catalyst, which means the sample runs on both iPad and Mac. This is achieved by selecting the Mac checkbox in Project Settings. For more about how Mac Catalyst works see [Mac Catalyst](https://developer.apple.com/mac-catalyst/).
|
||||
This sample app is built with Mac Catalyst, which means the sample runs on both iOS and Mac. This is achieved by selecting the Mac checkbox in Project Settings. For more about how Mac Catalyst works see [Mac Catalyst](https://developer.apple.com/mac-catalyst/).
|
||||
|
||||
When built for Mac Catalyst, this sample achieves:
|
||||
|
||||
* Interface Optimization for Mac — With Optimize Interface For the Mac project setting turned on, the app has full control of every pixel on the screen, and the app can adopt more controls specific to Mac. Building the sample for Mac Catalyst makes the app take advantage of the system features in macOS. The option Show Designed for iPad Run Destination allows this sample, as an iPad app, to run "as-is" on Apple silicon Macs. This requires macOS 11 and a Mac with Apple silicon.
|
||||
* Interface Optimization for Mac. With Optimize Interface For the Mac project setting turned on, the app has full control of every pixel on the screen, and the app can adopt more controls specific to Mac. Building the sample for Mac Catalyst makes the app take advantage of the system features in macOS. The option Show Designed for iPad Run Destination allows this sample, as an iPad app, to run as-is on Apple silicon Macs. This requires macOS 11 and a Mac with Apple silicon.
|
||||
|
||||
* Navigation and title bar hiding — The sample app hides these to make the app appear more like a Mac app. It also changes other behaviors by using traitCollection's `userInterfaceIdiom` or the compilation conditional block that uses the `targetEnvironment():` platform condition.
|
||||
* Navigation and title bar hiding. The sample app hides these to make the app appear more like a Mac app. It also changes other behaviors by using traitCollection's `userInterfaceIdiom`.
|
||||
|
||||
* Translucent background — By setting the split view controller's `primaryBackgroundStyle` to `.sidebar`, the primary view controller or side bar shows a blurred desktop behind its view. Setting this property has no effect when running in iOS.
|
||||
* Translucent background. By setting the split view controller's `primaryBackgroundStyle` to `.sidebar`, the primary view controller or side bar shows a blurred desktop behind its view. Setting this property has no effect when running on iOS.
|
||||
|
|
|
|||
|
|
@ -29,7 +29,10 @@
|
|||
2200544A18BC54F5002A6E8B /* WebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2200543B18BC54F5002A6E8B /* WebViewController.swift */; };
|
||||
228DBA0818BC53F1002BA12A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 228DBA0718BC53F1002BA12A /* Assets.xcassets */; };
|
||||
3E5C084E1974991E00969DD7 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3E5C08501974991E00969DD7 /* Main.storyboard */; };
|
||||
530A4AB626AF352B00C0C649 /* BaseTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 530A4AB526AF352B00C0C649 /* BaseTableViewController.swift */; };
|
||||
5312D0F222848B0200048DE2 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 5312D0F022848B0200048DE2 /* Credits.rtf */; };
|
||||
531AD242265E8B1200113EC6 /* VisualEffectViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 531AD241265E8B1100113EC6 /* VisualEffectViewController.swift */; };
|
||||
531AD245265E8B8700113EC6 /* VisualEffectViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 531AD243265E8B8700113EC6 /* VisualEffectViewController.storyboard */; };
|
||||
5340A1B62496CF64004F3666 /* DefaultToolbarViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5340A1B02496CF64004F3666 /* DefaultToolbarViewController.storyboard */; };
|
||||
5340A1B72496CF64004F3666 /* CustomToolbarViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5340A1B22496CF64004F3666 /* CustomToolbarViewController.storyboard */; };
|
||||
5340A1B82496CF64004F3666 /* TintedToolbarViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5340A1B42496CF64004F3666 /* TintedToolbarViewController.storyboard */; };
|
||||
|
|
@ -41,12 +44,15 @@
|
|||
5364C0992496C2B3009A9A52 /* DefaultPageControlViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5364C0952496C2B3009A9A52 /* DefaultPageControlViewController.storyboard */; };
|
||||
5364C09A2496C2B3009A9A52 /* CustomPageControlViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5364C0972496C2B3009A9A52 /* CustomPageControlViewController.storyboard */; };
|
||||
53654E232298881200B999C7 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53654E222298881200B999C7 /* WebKit.framework */; };
|
||||
5387556B2660933A0041A1B4 /* PointerInteractionButtonViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5387556A2660933A0041A1B4 /* PointerInteractionButtonViewController.swift */; };
|
||||
53875571266095990041A1B4 /* PointerInteractionButtonViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5387556F266095990041A1B4 /* PointerInteractionButtonViewController.storyboard */; };
|
||||
538B36F41F2A8E06002AE100 /* DatePickerController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 538B36F21F2A8D97002AE100 /* DatePickerController.storyboard */; };
|
||||
538B36F71F2A8E8A002AE100 /* TextViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 538B36F51F2A8E66002AE100 /* TextViewController.storyboard */; };
|
||||
539029FF1F2A53AD009775E3 /* AlertControllerViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 539029FD1F2A53AD009775E3 /* AlertControllerViewController.storyboard */; };
|
||||
539C6BAE1F27F4980006C5A9 /* ActivityIndicatorViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 539C6BA81F27F4980006C5A9 /* ActivityIndicatorViewController.storyboard */; };
|
||||
539C6BAF1F27F4980006C5A9 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 539C6BAA1F27F4980006C5A9 /* LaunchScreen.storyboard */; };
|
||||
539C6BB01F27F4980006C5A9 /* WebViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 539C6BAC1F27F4980006C5A9 /* WebViewController.storyboard */; };
|
||||
53A2264B26C1AE7000C0EF3F /* Localizable.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = 53A2264926C1A70800C0EF3F /* Localizable.stringsdict */; };
|
||||
53A266B52491ED77008EADBB /* ImagePickerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53A266AE2491ED77008EADBB /* ImagePickerViewController.swift */; };
|
||||
53A266B62491ED77008EADBB /* CustomPageControlViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53A266AF2491ED77008EADBB /* CustomPageControlViewController.swift */; };
|
||||
53A266B82491ED77008EADBB /* ColorPickerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53A266B12491ED77008EADBB /* ColorPickerViewController.swift */; };
|
||||
|
|
@ -57,6 +63,9 @@
|
|||
53B791DA1F85505400AB2FA6 /* content.html in Resources */ = {isa = PBXBuildFile; fileRef = 53B791D41F854B4700AB2FA6 /* content.html */; };
|
||||
53B791DB1F85505700AB2FA6 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 53B791D61F854B4700AB2FA6 /* InfoPlist.strings */; };
|
||||
53B791DC1F85505A00AB2FA6 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 53B791D81F854B4800AB2FA6 /* Localizable.strings */; };
|
||||
53CB2C59265FFE9900155325 /* ButtonViewController+Configs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53CB2C58265FFE9900155325 /* ButtonViewController+Configs.swift */; };
|
||||
53CB2C60266003A800155325 /* MenuButtonViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 53CB2C5E266003A800155325 /* MenuButtonViewController.storyboard */; };
|
||||
53CB2C62266003B200155325 /* MenuButtonViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53CB2C61266003B200155325 /* MenuButtonViewController.swift */; };
|
||||
53CE5AD81F2A89E500D8A656 /* ButtonViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 53CE5AD61F2A89E500D8A656 /* ButtonViewController.storyboard */; };
|
||||
53CE5ADE1F2A8A3D00D8A656 /* ImageViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 53CE5ADC1F2A8A3D00D8A656 /* ImageViewController.storyboard */; };
|
||||
53CE5AE61F2A8AEF00D8A656 /* PickerViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 53CE5AE41F2A8AEF00D8A656 /* PickerViewController.storyboard */; };
|
||||
|
|
@ -67,6 +76,9 @@
|
|||
53CE5AF51F2A8BB000D8A656 /* StepperViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 53CE5AF31F2A8BB000D8A656 /* StepperViewController.storyboard */; };
|
||||
53CE5AF81F2A8BD000D8A656 /* SwitchViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 53CE5AF61F2A8BD000D8A656 /* SwitchViewController.storyboard */; };
|
||||
53CE5AFB1F2A8BEB00D8A656 /* TextFieldViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 53CE5AF91F2A8BEB00D8A656 /* TextFieldViewController.storyboard */; };
|
||||
53D054A526790B6E00CD8B1A /* SymbolViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 53D054A326790B6E00CD8B1A /* SymbolViewController.storyboard */; };
|
||||
53D054A726790B7D00CD8B1A /* SymbolViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53D054A626790B7D00CD8B1A /* SymbolViewController.swift */; };
|
||||
53F57011265761D500458712 /* CaseElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53F57010265761D500458712 /* CaseElement.swift */; };
|
||||
B50F41081B1D284700E5147D /* StackViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B50F41071B1D284700E5147D /* StackViewController.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
|
|
@ -96,7 +108,10 @@
|
|||
228DB9F718BC53F1002BA12A /* UIKitCatalog-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "UIKitCatalog-Info.plist"; sourceTree = "<group>"; };
|
||||
228DBA0718BC53F1002BA12A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
3E5C084F1974991E00969DD7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
530A4AB526AF352B00C0C649 /* BaseTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseTableViewController.swift; sourceTree = "<group>"; };
|
||||
5312D0F122848B0200048DE2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = Base; path = Base.lproj/Credits.rtf; sourceTree = "<group>"; };
|
||||
531AD241265E8B1100113EC6 /* VisualEffectViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VisualEffectViewController.swift; sourceTree = "<group>"; };
|
||||
531AD244265E8B8700113EC6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/VisualEffectViewController.storyboard; sourceTree = "<group>"; };
|
||||
5340A1B12496CF64004F3666 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/DefaultToolbarViewController.storyboard; sourceTree = "<group>"; };
|
||||
5340A1B32496CF64004F3666 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/CustomToolbarViewController.storyboard; sourceTree = "<group>"; };
|
||||
5340A1B52496CF64004F3666 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/TintedToolbarViewController.storyboard; sourceTree = "<group>"; };
|
||||
|
|
@ -108,12 +123,15 @@
|
|||
5364C0962496C2B3009A9A52 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/DefaultPageControlViewController.storyboard; sourceTree = "<group>"; };
|
||||
5364C0982496C2B3009A9A52 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/CustomPageControlViewController.storyboard; sourceTree = "<group>"; };
|
||||
53654E222298881200B999C7 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
|
||||
5387556A2660933A0041A1B4 /* PointerInteractionButtonViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PointerInteractionButtonViewController.swift; sourceTree = "<group>"; };
|
||||
53875570266095990041A1B4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/PointerInteractionButtonViewController.storyboard; sourceTree = "<group>"; };
|
||||
538B36F31F2A8D97002AE100 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/DatePickerController.storyboard; sourceTree = "<group>"; };
|
||||
538B36F61F2A8E66002AE100 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/TextViewController.storyboard; sourceTree = "<group>"; };
|
||||
539029FE1F2A53AD009775E3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/AlertControllerViewController.storyboard; sourceTree = "<group>"; };
|
||||
539C6BA91F27F4980006C5A9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/ActivityIndicatorViewController.storyboard; sourceTree = "<group>"; };
|
||||
539C6BAB1F27F4980006C5A9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
539C6BAD1F27F4980006C5A9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/WebViewController.storyboard; sourceTree = "<group>"; };
|
||||
53A2264A26C1A70800C0EF3F /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = Base; path = UIKitCatalog/Base.lproj/Localizable.stringsdict; sourceTree = "<group>"; };
|
||||
53A266AE2491ED77008EADBB /* ImagePickerViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImagePickerViewController.swift; sourceTree = "<group>"; };
|
||||
53A266AF2491ED77008EADBB /* CustomPageControlViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomPageControlViewController.swift; sourceTree = "<group>"; };
|
||||
53A266B12491ED77008EADBB /* ColorPickerViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ColorPickerViewController.swift; sourceTree = "<group>"; };
|
||||
|
|
@ -124,6 +142,9 @@
|
|||
53B791D51F854B4700AB2FA6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.html; name = Base; path = Base.lproj/content.html; sourceTree = "<group>"; };
|
||||
53B791D71F854B4700AB2FA6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
53B791D91F854B4800AB2FA6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||
53CB2C58265FFE9900155325 /* ButtonViewController+Configs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ButtonViewController+Configs.swift"; sourceTree = "<group>"; };
|
||||
53CB2C5F266003A800155325 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MenuButtonViewController.storyboard; sourceTree = "<group>"; };
|
||||
53CB2C61266003B200155325 /* MenuButtonViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MenuButtonViewController.swift; sourceTree = "<group>"; };
|
||||
53CE5AD71F2A89E500D8A656 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/ButtonViewController.storyboard; sourceTree = "<group>"; };
|
||||
53CE5ADD1F2A8A3D00D8A656 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/ImageViewController.storyboard; sourceTree = "<group>"; };
|
||||
53CE5AE51F2A8AEF00D8A656 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/PickerViewController.storyboard; sourceTree = "<group>"; };
|
||||
|
|
@ -134,7 +155,10 @@
|
|||
53CE5AF41F2A8BB000D8A656 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/StepperViewController.storyboard; sourceTree = "<group>"; };
|
||||
53CE5AF71F2A8BD000D8A656 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/SwitchViewController.storyboard; sourceTree = "<group>"; };
|
||||
53CE5AFA1F2A8BEB00D8A656 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/TextFieldViewController.storyboard; sourceTree = "<group>"; };
|
||||
53D054A426790B6E00CD8B1A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/SymbolViewController.storyboard; sourceTree = "<group>"; };
|
||||
53D054A626790B7D00CD8B1A /* SymbolViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SymbolViewController.swift; sourceTree = "<group>"; };
|
||||
53DDE73C22776382000006CF /* UIKitCatalog.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = UIKitCatalog.entitlements; sourceTree = "<group>"; };
|
||||
53F57010265761D500458712 /* CaseElement.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CaseElement.swift; sourceTree = "<group>"; };
|
||||
64D8CD77C30F3CED2D55B8F2 /* LICENSE.txt */ = {isa = PBXFileReference; includeInIndex = 1; path = LICENSE.txt; sourceTree = "<group>"; };
|
||||
8A04EFECD9880EE89ADA2FE8 /* SampleCode.xcconfig */ = {isa = PBXFileReference; name = SampleCode.xcconfig; path = Configuration/SampleCode.xcconfig; sourceTree = "<group>"; };
|
||||
B50F41071B1D284700E5147D /* StackViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StackViewController.swift; sourceTree = "<group>"; };
|
||||
|
|
@ -203,6 +227,7 @@
|
|||
53B791D41F854B4700AB2FA6 /* content.html */,
|
||||
53B791D61F854B4700AB2FA6 /* InfoPlist.strings */,
|
||||
53B791D81F854B4800AB2FA6 /* Localizable.strings */,
|
||||
53A2264926C1A70800C0EF3F /* Localizable.stringsdict */,
|
||||
5312D0F022848B0200048DE2 /* Credits.rtf */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
|
|
@ -235,20 +260,16 @@
|
|||
3E1DA7601931CC99000114A9 /* Controls */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2200542118BC54EC002A6E8B /* ButtonViewController.swift */,
|
||||
53CE5AD61F2A89E500D8A656 /* ButtonViewController.storyboard */,
|
||||
53D34692265D86FF00D0B553 /* Button */,
|
||||
53CB2C5A2660038E00155325 /* Menu Button */,
|
||||
53875569266093290041A1B4 /* Pointer Interaction Button */,
|
||||
5364C0942496C22D009A9A52 /* Page Control */,
|
||||
22B7BB9718BC601D006C4AD5 /* Search */,
|
||||
2200543318BC54F5002A6E8B /* SegmentedControlViewController.swift */,
|
||||
53CE5AEA1F2A8B2F00D8A656 /* SegmentedControlViewController.storyboard */,
|
||||
2200543418BC54F5002A6E8B /* SliderViewController.swift */,
|
||||
53CE5AED1F2A8B4F00D8A656 /* SliderViewController.storyboard */,
|
||||
2200543618BC54F5002A6E8B /* StepperViewController.swift */,
|
||||
53CE5AF31F2A8BB000D8A656 /* StepperViewController.storyboard */,
|
||||
2200543718BC54F5002A6E8B /* SwitchViewController.swift */,
|
||||
53CE5AF61F2A8BD000D8A656 /* SwitchViewController.storyboard */,
|
||||
2200543818BC54F5002A6E8B /* TextFieldViewController.swift */,
|
||||
53CE5AF91F2A8BEB00D8A656 /* TextFieldViewController.storyboard */,
|
||||
53D34693265D871500D0B553 /* Segmented */,
|
||||
53D34694265D872A00D0B553 /* Slider */,
|
||||
53D428AA26826A8D001A0414 /* Stepper */,
|
||||
53D428AC26826AB1001A0414 /* Switch */,
|
||||
53D428AB26826A9C001A0414 /* TextField */,
|
||||
);
|
||||
name = Controls;
|
||||
sourceTree = "<group>";
|
||||
|
|
@ -259,6 +280,8 @@
|
|||
2200541C18BC54E8002A6E8B /* AppDelegate.swift */,
|
||||
535D32B124970EF10011E153 /* SceneDelegate.swift */,
|
||||
5364C08A249696D7009A9A52 /* OutlineViewController.swift */,
|
||||
53F57010265761D500458712 /* CaseElement.swift */,
|
||||
530A4AB526AF352B00C0C649 /* BaseTableViewController.swift */,
|
||||
);
|
||||
name = Application;
|
||||
sourceTree = "<group>";
|
||||
|
|
@ -282,22 +305,39 @@
|
|||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
53875569266093290041A1B4 /* Pointer Interaction Button */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5387556A2660933A0041A1B4 /* PointerInteractionButtonViewController.swift */,
|
||||
5387556F266095990041A1B4 /* PointerInteractionButtonViewController.storyboard */,
|
||||
);
|
||||
name = "Pointer Interaction Button";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
53927674268684F900CB7664 /* ProgressView */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2200543218BC54F5002A6E8B /* ProgressViewController.swift */,
|
||||
53CE5AE71F2A8B1000D8A656 /* ProgressViewController.storyboard */,
|
||||
);
|
||||
name = ProgressView;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
539383DE2492800100A489A9 /* Views */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2200541A18BC54E8002A6E8B /* ActivityIndicatorViewController.swift */,
|
||||
539C6BA81F27F4980006C5A9 /* ActivityIndicatorViewController.storyboard */,
|
||||
53D428AD2682C58C001A0414 /* ActivityIndicator */,
|
||||
2200541B18BC54E8002A6E8B /* AlertControllerViewController.swift */,
|
||||
539029FD1F2A53AD009775E3 /* AlertControllerViewController.storyboard */,
|
||||
2200542D18BC54F5002A6E8B /* ImageViewController.swift */,
|
||||
53CE5ADC1F2A8A3D00D8A656 /* ImageViewController.storyboard */,
|
||||
2200543218BC54F5002A6E8B /* ProgressViewController.swift */,
|
||||
53CE5AE71F2A8B1000D8A656 /* ProgressViewController.storyboard */,
|
||||
B50F41071B1D284700E5147D /* StackViewController.swift */,
|
||||
53CE5AF01F2A8B8300D8A656 /* StackViewController.storyboard */,
|
||||
2200543918BC54F5002A6E8B /* TextViewController.swift */,
|
||||
538B36F51F2A8E66002AE100 /* TextViewController.storyboard */,
|
||||
53D0549F26790A3200CD8B1A /* Image View */,
|
||||
53927674268684F900CB7664 /* ProgressView */,
|
||||
B50F41071B1D284700E5147D /* StackViewController.swift */,
|
||||
53CE5AF01F2A8B8300D8A656 /* StackViewController.storyboard */,
|
||||
22B7BB9818BC6024006C4AD5 /* Toolbar */,
|
||||
531AD241265E8B1100113EC6 /* VisualEffectViewController.swift */,
|
||||
531AD243265E8B8700113EC6 /* VisualEffectViewController.storyboard */,
|
||||
2200543B18BC54F5002A6E8B /* WebViewController.swift */,
|
||||
539C6BAC1F27F4980006C5A9 /* WebViewController.storyboard */,
|
||||
);
|
||||
|
|
@ -321,6 +361,90 @@
|
|||
name = Pickers;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
53CB2C5A2660038E00155325 /* Menu Button */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
53CB2C61266003B200155325 /* MenuButtonViewController.swift */,
|
||||
53CB2C5E266003A800155325 /* MenuButtonViewController.storyboard */,
|
||||
);
|
||||
name = "Menu Button";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
53D0549F26790A3200CD8B1A /* Image View */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2200542D18BC54F5002A6E8B /* ImageViewController.swift */,
|
||||
53CE5ADC1F2A8A3D00D8A656 /* ImageViewController.storyboard */,
|
||||
53D054A626790B7D00CD8B1A /* SymbolViewController.swift */,
|
||||
53D054A326790B6E00CD8B1A /* SymbolViewController.storyboard */,
|
||||
);
|
||||
name = "Image View";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
53D34692265D86FF00D0B553 /* Button */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2200542118BC54EC002A6E8B /* ButtonViewController.swift */,
|
||||
53CB2C58265FFE9900155325 /* ButtonViewController+Configs.swift */,
|
||||
53CE5AD61F2A89E500D8A656 /* ButtonViewController.storyboard */,
|
||||
);
|
||||
name = Button;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
53D34693265D871500D0B553 /* Segmented */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2200543318BC54F5002A6E8B /* SegmentedControlViewController.swift */,
|
||||
53CE5AEA1F2A8B2F00D8A656 /* SegmentedControlViewController.storyboard */,
|
||||
);
|
||||
name = Segmented;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
53D34694265D872A00D0B553 /* Slider */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2200543418BC54F5002A6E8B /* SliderViewController.swift */,
|
||||
53CE5AED1F2A8B4F00D8A656 /* SliderViewController.storyboard */,
|
||||
);
|
||||
name = Slider;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
53D428AA26826A8D001A0414 /* Stepper */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2200543618BC54F5002A6E8B /* StepperViewController.swift */,
|
||||
53CE5AF31F2A8BB000D8A656 /* StepperViewController.storyboard */,
|
||||
);
|
||||
name = Stepper;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
53D428AB26826A9C001A0414 /* TextField */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2200543818BC54F5002A6E8B /* TextFieldViewController.swift */,
|
||||
53CE5AF91F2A8BEB00D8A656 /* TextFieldViewController.storyboard */,
|
||||
);
|
||||
name = TextField;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
53D428AC26826AB1001A0414 /* Switch */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2200543718BC54F5002A6E8B /* SwitchViewController.swift */,
|
||||
53CE5AF61F2A8BD000D8A656 /* SwitchViewController.storyboard */,
|
||||
);
|
||||
name = Switch;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
53D428AD2682C58C001A0414 /* ActivityIndicator */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2200541A18BC54E8002A6E8B /* ActivityIndicatorViewController.swift */,
|
||||
539C6BA81F27F4980006C5A9 /* ActivityIndicatorViewController.storyboard */,
|
||||
);
|
||||
name = ActivityIndicator;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D9361AEE59ED9397893793F6 /* LICENSE */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
|
@ -399,12 +523,14 @@
|
|||
53A266C22491ED9E008EADBB /* ImagePickerViewController.storyboard in Resources */,
|
||||
5364C0992496C2B3009A9A52 /* DefaultPageControlViewController.storyboard in Resources */,
|
||||
5340A1B72496CF64004F3666 /* CustomToolbarViewController.storyboard in Resources */,
|
||||
53875571266095990041A1B4 /* PointerInteractionButtonViewController.storyboard in Resources */,
|
||||
53CE5AE61F2A8AEF00D8A656 /* PickerViewController.storyboard in Resources */,
|
||||
53B791DA1F85505400AB2FA6 /* content.html in Resources */,
|
||||
3E5C084E1974991E00969DD7 /* Main.storyboard in Resources */,
|
||||
53CE5AEC1F2A8B2F00D8A656 /* SegmentedControlViewController.storyboard in Resources */,
|
||||
5364C0932496BEFD009A9A52 /* CustomSearchBarViewController.storyboard in Resources */,
|
||||
53B791DB1F85505700AB2FA6 /* InfoPlist.strings in Resources */,
|
||||
53CB2C60266003A800155325 /* MenuButtonViewController.storyboard in Resources */,
|
||||
539C6BAE1F27F4980006C5A9 /* ActivityIndicatorViewController.storyboard in Resources */,
|
||||
53CE5AFB1F2A8BEB00D8A656 /* TextFieldViewController.storyboard in Resources */,
|
||||
53B791DC1F85505A00AB2FA6 /* Localizable.strings in Resources */,
|
||||
|
|
@ -415,9 +541,12 @@
|
|||
538B36F71F2A8E8A002AE100 /* TextViewController.storyboard in Resources */,
|
||||
539C6BAF1F27F4980006C5A9 /* LaunchScreen.storyboard in Resources */,
|
||||
5312D0F222848B0200048DE2 /* Credits.rtf in Resources */,
|
||||
53D054A526790B6E00CD8B1A /* SymbolViewController.storyboard in Resources */,
|
||||
539029FF1F2A53AD009775E3 /* AlertControllerViewController.storyboard in Resources */,
|
||||
53CE5AF51F2A8BB000D8A656 /* StepperViewController.storyboard in Resources */,
|
||||
531AD245265E8B8700113EC6 /* VisualEffectViewController.storyboard in Resources */,
|
||||
53CE5AF81F2A8BD000D8A656 /* SwitchViewController.storyboard in Resources */,
|
||||
53A2264B26C1AE7000C0EF3F /* Localizable.stringsdict in Resources */,
|
||||
5340A1B62496CF64004F3666 /* DefaultToolbarViewController.storyboard in Resources */,
|
||||
53CE5ADE1F2A8A3D00D8A656 /* ImageViewController.storyboard in Resources */,
|
||||
);
|
||||
|
|
@ -437,6 +566,8 @@
|
|||
2200544218BC54F5002A6E8B /* SegmentedControlViewController.swift in Sources */,
|
||||
2200544A18BC54F5002A6E8B /* WebViewController.swift in Sources */,
|
||||
2200542018BC54E8002A6E8B /* AppDelegate.swift in Sources */,
|
||||
531AD242265E8B1200113EC6 /* VisualEffectViewController.swift in Sources */,
|
||||
53CB2C62266003B200155325 /* MenuButtonViewController.swift in Sources */,
|
||||
5340A1B92496D670004F3666 /* PickerViewController.swift in Sources */,
|
||||
53A266B92491ED77008EADBB /* FontPickerViewController.swift in Sources */,
|
||||
2200541F18BC54E8002A6E8B /* AlertControllerViewController.swift in Sources */,
|
||||
|
|
@ -445,16 +576,21 @@
|
|||
2200541E18BC54E8002A6E8B /* ActivityIndicatorViewController.swift in Sources */,
|
||||
2200544618BC54F5002A6E8B /* SwitchViewController.swift in Sources */,
|
||||
B50F41081B1D284700E5147D /* StackViewController.swift in Sources */,
|
||||
530A4AB626AF352B00C0C649 /* BaseTableViewController.swift in Sources */,
|
||||
535D32B224970EF10011E153 /* SceneDelegate.swift in Sources */,
|
||||
53F57011265761D500458712 /* CaseElement.swift in Sources */,
|
||||
2200544118BC54F5002A6E8B /* ProgressViewController.swift in Sources */,
|
||||
2200544718BC54F5002A6E8B /* TextFieldViewController.swift in Sources */,
|
||||
2200544818BC54F5002A6E8B /* TextViewController.swift in Sources */,
|
||||
5387556B2660933A0041A1B4 /* PointerInteractionButtonViewController.swift in Sources */,
|
||||
2200542B18BC54EC002A6E8B /* DefaultSearchBarViewController.swift in Sources */,
|
||||
2200544518BC54F5002A6E8B /* StepperViewController.swift in Sources */,
|
||||
53D054A726790B7D00CD8B1A /* SymbolViewController.swift in Sources */,
|
||||
53A266B62491ED77008EADBB /* CustomPageControlViewController.swift in Sources */,
|
||||
53A266B82491ED77008EADBB /* ColorPickerViewController.swift in Sources */,
|
||||
2200542818BC54EC002A6E8B /* CustomSearchBarViewController.swift in Sources */,
|
||||
53A266B52491ED77008EADBB /* ImagePickerViewController.swift in Sources */,
|
||||
53CB2C59265FFE9900155325 /* ButtonViewController+Configs.swift in Sources */,
|
||||
2200542918BC54EC002A6E8B /* CustomToolbarViewController.swift in Sources */,
|
||||
2200542A18BC54EC002A6E8B /* DatePickerController.swift in Sources */,
|
||||
2200542718BC54EC002A6E8B /* ButtonViewController.swift in Sources */,
|
||||
|
|
@ -480,6 +616,14 @@
|
|||
name = Credits.rtf;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
531AD243265E8B8700113EC6 /* VisualEffectViewController.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
531AD244265E8B8700113EC6 /* Base */,
|
||||
);
|
||||
name = VisualEffectViewController.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5340A1B02496CF64004F3666 /* DefaultToolbarViewController.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
|
|
@ -536,6 +680,14 @@
|
|||
name = CustomPageControlViewController.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5387556F266095990041A1B4 /* PointerInteractionButtonViewController.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
53875570266095990041A1B4 /* Base */,
|
||||
);
|
||||
name = PointerInteractionButtonViewController.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
538B36F21F2A8D97002AE100 /* DatePickerController.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
|
|
@ -584,6 +736,14 @@
|
|||
name = WebViewController.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
53A2264926C1A70800C0EF3F /* Localizable.stringsdict */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
53A2264A26C1A70800C0EF3F /* Base */,
|
||||
);
|
||||
name = Localizable.stringsdict;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
53A266BA2491ED9E008EADBB /* ImagePickerViewController.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
|
|
@ -632,6 +792,14 @@
|
|||
name = Localizable.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
53CB2C5E266003A800155325 /* MenuButtonViewController.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
53CB2C5F266003A800155325 /* Base */,
|
||||
);
|
||||
name = MenuButtonViewController.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
53CE5AD61F2A89E500D8A656 /* ButtonViewController.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
|
|
@ -712,6 +880,14 @@
|
|||
name = TextFieldViewController.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
53D054A326790B6E00CD8B1A /* SymbolViewController.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
53D054A426790B6E00CD8B1A /* Base */,
|
||||
);
|
||||
name = SymbolViewController.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
|
|
@ -831,9 +1007,9 @@
|
|||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
|
||||
DEVELOPMENT_TEAM = "";
|
||||
INFOPLIST_FILE = "$(SRCROOT)/UIKitCatalog/UIKitCatalog-Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
|
||||
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
|
||||
MARKETING_VERSION = 16;
|
||||
MARKETING_VERSION = 17;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.example.apple-samplecode.${PRODUCT_NAME:rfc1034identifier}${SAMPLE_CODE_DISAMBIGUATOR}";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
|
|
@ -854,9 +1030,9 @@
|
|||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
|
||||
DEVELOPMENT_TEAM = "";
|
||||
INFOPLIST_FILE = "$(SRCROOT)/UIKitCatalog/UIKitCatalog-Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
|
||||
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
|
||||
MARKETING_VERSION = 16;
|
||||
MARKETING_VERSION = 17;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.example.apple-samplecode.${PRODUCT_NAME:rfc1034identifier}${SAMPLE_CODE_DISAMBIGUATOR}";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
|
|
|
|||
|
|
@ -7,78 +7,75 @@ A view controller that demonstrates how to use `UIActivityIndicatorView`.
|
|||
|
||||
import UIKit
|
||||
|
||||
class ActivityIndicatorViewController: UITableViewController {
|
||||
// MARK: - Properties
|
||||
|
||||
@IBOutlet weak var defaultSmallActivityIndicatorView: UIActivityIndicatorView!
|
||||
@IBOutlet weak var defaultLargeActivityIndicatorView: UIActivityIndicatorView!
|
||||
class ActivityIndicatorViewController: BaseTableViewController {
|
||||
|
||||
@IBOutlet weak var tintedSmallActivityIndicatorView: UIActivityIndicatorView!
|
||||
@IBOutlet weak var tintedLargeActivityIndicatorView: UIActivityIndicatorView!
|
||||
// Cell identifier for each activity indicator table view cell.
|
||||
enum ActivityIndicatorKind: String, CaseIterable {
|
||||
case mediumIndicator
|
||||
case largeIndicator
|
||||
case mediumTintedIndicator
|
||||
case largeTintedIndicator
|
||||
}
|
||||
|
||||
// MARK: - View Life Cycle
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
testCells.append(contentsOf: [
|
||||
CaseElement(title: NSLocalizedString("MediumIndicatorTitle", comment: ""),
|
||||
cellID: ActivityIndicatorKind.mediumIndicator.rawValue,
|
||||
configHandler: configureMediumActivityIndicatorView),
|
||||
CaseElement(title: NSLocalizedString("LargeIndicatorTitle", comment: ""),
|
||||
cellID: ActivityIndicatorKind.largeIndicator.rawValue,
|
||||
configHandler: configureLargeActivityIndicatorView)
|
||||
])
|
||||
|
||||
configureDefaultActivityIndicatorView()
|
||||
configureTintedActivityIndicatorView()
|
||||
|
||||
// When the activity is done, be sure to use UIActivityIndicatorView.stopAnimating().
|
||||
if traitCollection.userInterfaceIdiom != .mac {
|
||||
// Tinted activity indicators available only on iOS.
|
||||
testCells.append(contentsOf: [
|
||||
CaseElement(title: NSLocalizedString("MediumTintedIndicatorTitle", comment: ""),
|
||||
cellID: ActivityIndicatorKind.mediumTintedIndicator.rawValue,
|
||||
configHandler: configureMediumTintedActivityIndicatorView),
|
||||
CaseElement(title: NSLocalizedString("LargeTintedIndicatorTitle", comment: ""),
|
||||
cellID: ActivityIndicatorKind.largeTintedIndicator.rawValue,
|
||||
configHandler: configureLargeTintedActivityIndicatorView)
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Configuration
|
||||
|
||||
func configureMediumActivityIndicatorView(_ activityIndicator: UIActivityIndicatorView) {
|
||||
activityIndicator.style = UIActivityIndicatorView.Style.medium
|
||||
activityIndicator.hidesWhenStopped = true
|
||||
|
||||
activityIndicator.startAnimating()
|
||||
// When the activity is done, be sure to use UIActivityIndicatorView.stopAnimating().
|
||||
}
|
||||
|
||||
func configureLargeActivityIndicatorView(_ activityIndicator: UIActivityIndicatorView) {
|
||||
activityIndicator.style = UIActivityIndicatorView.Style.large
|
||||
activityIndicator.hidesWhenStopped = true
|
||||
|
||||
func configureDefaultActivityIndicatorView() {
|
||||
defaultSmallActivityIndicatorView.style = UIActivityIndicatorView.Style.medium
|
||||
defaultLargeActivityIndicatorView.style = UIActivityIndicatorView.Style.large
|
||||
|
||||
defaultSmallActivityIndicatorView.startAnimating()
|
||||
defaultLargeActivityIndicatorView.startAnimating()
|
||||
|
||||
defaultSmallActivityIndicatorView.hidesWhenStopped = true
|
||||
defaultLargeActivityIndicatorView.hidesWhenStopped = true
|
||||
activityIndicator.startAnimating()
|
||||
// When the activity is done, be sure to use UIActivityIndicatorView.stopAnimating().
|
||||
}
|
||||
|
||||
func configureTintedActivityIndicatorView() {
|
||||
tintedSmallActivityIndicatorView.style = UIActivityIndicatorView.Style.medium
|
||||
tintedLargeActivityIndicatorView.style = UIActivityIndicatorView.Style.large
|
||||
|
||||
tintedSmallActivityIndicatorView.color = UIColor.systemPurple
|
||||
tintedLargeActivityIndicatorView.color = UIColor.systemPurple
|
||||
|
||||
tintedSmallActivityIndicatorView.startAnimating()
|
||||
tintedLargeActivityIndicatorView.startAnimating()
|
||||
func configureMediumTintedActivityIndicatorView(_ activityIndicator: UIActivityIndicatorView) {
|
||||
activityIndicator.style = UIActivityIndicatorView.Style.medium
|
||||
activityIndicator.hidesWhenStopped = true
|
||||
activityIndicator.color = UIColor.systemPurple
|
||||
|
||||
activityIndicator.startAnimating()
|
||||
// When the activity is done, be sure to use UIActivityIndicatorView.stopAnimating().
|
||||
}
|
||||
|
||||
// MARK: - UITableViewDataSource
|
||||
|
||||
override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
|
||||
#if targetEnvironment(macCatalyst)
|
||||
// Don't show tinted activitiy indicator for macOS, it does not exist.
|
||||
if section == 1 {
|
||||
return ""
|
||||
} else {
|
||||
return super.tableView(tableView, titleForHeaderInSection: section)
|
||||
}
|
||||
#else
|
||||
return super.tableView(tableView, titleForHeaderInSection: section)
|
||||
#endif
|
||||
func configureLargeTintedActivityIndicatorView(_ activityIndicator: UIActivityIndicatorView) {
|
||||
activityIndicator.style = UIActivityIndicatorView.Style.large
|
||||
activityIndicator.hidesWhenStopped = true
|
||||
activityIndicator.color = UIColor.systemPurple
|
||||
|
||||
activityIndicator.startAnimating()
|
||||
// When the activity is done, be sure to use UIActivityIndicatorView.stopAnimating().
|
||||
}
|
||||
|
||||
// MARK: - UITableViewDelegate
|
||||
|
||||
override func tableView(_ tableView: UITableView,
|
||||
heightForRowAt indexPath: IndexPath) -> CGFloat {
|
||||
#if targetEnvironment(macCatalyst)
|
||||
// Don't show tinted activity indicator for macOS, it does not exist.
|
||||
if indexPath.section == 1 {
|
||||
return 0
|
||||
} else {
|
||||
return super.tableView(tableView, heightForRowAt: indexPath)
|
||||
}
|
||||
#else
|
||||
return super.tableView(tableView, heightForRowAt: indexPath)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,21 +32,21 @@ class AlertControllerViewController: UITableViewController {
|
|||
case howOtherActionSheet
|
||||
}
|
||||
|
||||
private var textDidChangeObserver: NSObjectProtocol!
|
||||
|
||||
private var textDidChangeObserver: Any? = nil
|
||||
|
||||
// MARK: - UIAlertControllerStyleAlert Style Alerts
|
||||
|
||||
/// Show an alert with an "OK" button.
|
||||
func showSimpleAlert() {
|
||||
let title = NSLocalizedString("A Short Title is Best", comment: "")
|
||||
let message = NSLocalizedString("A message should be a short, complete sentence.", comment: "")
|
||||
let message = NSLocalizedString("A message needs to be a short, complete sentence.", comment: "")
|
||||
let cancelButtonTitle = NSLocalizedString("OK", comment: "")
|
||||
|
||||
let alertController = UIAlertController(title: title, message: message, preferredStyle: .alert)
|
||||
|
||||
// Create the action.
|
||||
let cancelAction = UIAlertAction(title: cancelButtonTitle, style: .cancel) { _ in
|
||||
print("The simple alert's cancel action occurred.")
|
||||
Swift.debugPrint("The simple alert's cancel action occurred.")
|
||||
}
|
||||
|
||||
// Add the action.
|
||||
|
|
@ -58,7 +58,7 @@ class AlertControllerViewController: UITableViewController {
|
|||
/// Show an alert with an "OK" and "Cancel" button.
|
||||
func showOkayCancelAlert() {
|
||||
let title = NSLocalizedString("A Short Title is Best", comment: "")
|
||||
let message = NSLocalizedString("A message should be a short, complete sentence.", comment: "")
|
||||
let message = NSLocalizedString("A message needs to be a short, complete sentence.", comment: "")
|
||||
let cancelButtonTitle = NSLocalizedString("Cancel", comment: "")
|
||||
let otherButtonTitle = NSLocalizedString("OK", comment: "")
|
||||
|
||||
|
|
@ -66,11 +66,11 @@ class AlertControllerViewController: UITableViewController {
|
|||
|
||||
// Create the actions.
|
||||
let cancelAction = UIAlertAction(title: cancelButtonTitle, style: .cancel) { _ in
|
||||
print("The \"OK/Cancel\" alert's cancel action occurred.")
|
||||
Swift.debugPrint("The \"OK/Cancel\" alert's cancel action occurred.")
|
||||
}
|
||||
|
||||
let otherAction = UIAlertAction(title: otherButtonTitle, style: .default) { _ in
|
||||
print("The \"OK/Cancel\" alert's other action occurred.")
|
||||
Swift.debugPrint("The \"OK/Cancel\" alert's other action occurred.")
|
||||
}
|
||||
|
||||
// Add the actions.
|
||||
|
|
@ -83,7 +83,7 @@ class AlertControllerViewController: UITableViewController {
|
|||
/// Show an alert with two custom buttons.
|
||||
func showOtherAlert() {
|
||||
let title = NSLocalizedString("A Short Title is Best", comment: "")
|
||||
let message = NSLocalizedString("A message should be a short, complete sentence.", comment: "")
|
||||
let message = NSLocalizedString("A message needs to be a short, complete sentence.", comment: "")
|
||||
let cancelButtonTitle = NSLocalizedString("Cancel", comment: "")
|
||||
let otherButtonTitleOne = NSLocalizedString("Choice One", comment: "")
|
||||
let otherButtonTitleTwo = NSLocalizedString("Choice Two", comment: "")
|
||||
|
|
@ -92,15 +92,15 @@ class AlertControllerViewController: UITableViewController {
|
|||
|
||||
// Create the actions.
|
||||
let cancelAction = UIAlertAction(title: cancelButtonTitle, style: .cancel) { _ in
|
||||
print("The \"Other\" alert's cancel action occurred.")
|
||||
Swift.debugPrint("The \"Other\" alert's cancel action occurred.")
|
||||
}
|
||||
|
||||
let otherButtonOneAction = UIAlertAction(title: otherButtonTitleOne, style: .default) { _ in
|
||||
print("The \"Other\" alert's other button one action occurred.")
|
||||
Swift.debugPrint("The \"Other\" alert's other button one action occurred.")
|
||||
}
|
||||
|
||||
let otherButtonTwoAction = UIAlertAction(title: otherButtonTitleTwo, style: .default) { _ in
|
||||
print("The \"Other\" alert's other button two action occurred.")
|
||||
Swift.debugPrint("The \"Other\" alert's other button two action occurred.")
|
||||
}
|
||||
|
||||
// Add the actions.
|
||||
|
|
@ -114,7 +114,7 @@ class AlertControllerViewController: UITableViewController {
|
|||
/// Show a text entry alert with two custom buttons.
|
||||
func showTextEntryAlert() {
|
||||
let title = NSLocalizedString("A Short Title is Best", comment: "")
|
||||
let message = NSLocalizedString("A message should be a short, complete sentence.", comment: "")
|
||||
let message = NSLocalizedString("A message needs to be a short, complete sentence.", comment: "")
|
||||
|
||||
let alertController = UIAlertController(title: title, message: message, preferredStyle: .alert)
|
||||
|
||||
|
|
@ -126,12 +126,12 @@ class AlertControllerViewController: UITableViewController {
|
|||
// Create the actions.
|
||||
let cancelButtonTitle = NSLocalizedString("Cancel", comment: "")
|
||||
let cancelAction = UIAlertAction(title: cancelButtonTitle, style: .cancel) { _ in
|
||||
print("The \"Text Entry\" alert's cancel action occurred.")
|
||||
Swift.debugPrint("The \"Text Entry\" alert's cancel action occurred.")
|
||||
}
|
||||
|
||||
let otherButtonTitle = NSLocalizedString("OK", comment: "")
|
||||
let otherAction = UIAlertAction(title: otherButtonTitle, style: .default) { _ in
|
||||
print("The \"Text Entry\" alert's other action occurred.")
|
||||
Swift.debugPrint("The \"Text Entry\" alert's other action occurred.")
|
||||
}
|
||||
|
||||
// Add the actions.
|
||||
|
|
@ -144,7 +144,7 @@ class AlertControllerViewController: UITableViewController {
|
|||
/// Show a secure text entry alert with two custom buttons.
|
||||
func showSecureTextEntryAlert() {
|
||||
let title = NSLocalizedString("A Short Title is Best", comment: "")
|
||||
let message = NSLocalizedString("A message should be a short, complete sentence.", comment: "")
|
||||
let message = NSLocalizedString("A message needs to be a short, complete sentence.", comment: "")
|
||||
let cancelButtonTitle = NSLocalizedString("Cancel", comment: "")
|
||||
let otherButtonTitle = NSLocalizedString("OK", comment: "")
|
||||
|
||||
|
|
@ -152,34 +152,40 @@ class AlertControllerViewController: UITableViewController {
|
|||
|
||||
// Add the text field for the secure text entry.
|
||||
alertController.addTextField { textField in
|
||||
/** Listen for changes to the text field's text so that we can toggle the current
|
||||
if let observer = self.textDidChangeObserver {
|
||||
NotificationCenter.default.removeObserver(observer)
|
||||
}
|
||||
/** Listen for changes to the text field's text so that we can toggle the current
|
||||
action's enabled property based on whether the user has entered a sufficiently
|
||||
secure entry.
|
||||
*/
|
||||
self.textDidChangeObserver = NotificationCenter.default.addObserver(
|
||||
forName: UITextField.textDidChangeNotification,
|
||||
object: textField,
|
||||
queue: OperationQueue.main) { (notification) in
|
||||
if let textField = notification.object as? UITextField {
|
||||
// Enforce a minimum length of >= 5 characters for secure text alerts.
|
||||
if let text = textField.text {
|
||||
self.secureTextAlertAction!.isEnabled = text.count >= 5
|
||||
} else {
|
||||
self.secureTextAlertAction!.isEnabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
self.textDidChangeObserver =
|
||||
NotificationCenter.default.addObserver(forName: UITextField.textDidChangeNotification,
|
||||
object: textField,
|
||||
queue: OperationQueue.main,
|
||||
using: { (notification) in
|
||||
if let textField = notification.object as? UITextField {
|
||||
// Enforce a minimum length of >= 5 characters for secure text alerts.
|
||||
if let alertAction = self.secureTextAlertAction {
|
||||
if let text = textField.text {
|
||||
alertAction.isEnabled = text.count >= 5
|
||||
} else {
|
||||
alertAction.isEnabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
textField.isSecureTextEntry = true
|
||||
}
|
||||
|
||||
// Create the actions.
|
||||
let cancelAction = UIAlertAction(title: cancelButtonTitle, style: .cancel) { _ in
|
||||
print("The \"Secure Text Entry\" alert's cancel action occurred.")
|
||||
Swift.debugPrint("The \"Secure Text Entry\" alert's cancel action occurred.")
|
||||
}
|
||||
|
||||
let otherAction = UIAlertAction(title: otherButtonTitle, style: .default) { _ in
|
||||
print("The \"Secure Text Entry\" alert's other action occurred.")
|
||||
Swift.debugPrint("The \"Secure Text Entry\" alert's other action occurred.")
|
||||
}
|
||||
|
||||
/** The text field initially has no text in the text field, so we'll disable it for now.
|
||||
|
|
@ -203,7 +209,7 @@ class AlertControllerViewController: UITableViewController {
|
|||
|
||||
// Show a dialog with an "OK" and "Cancel" button.
|
||||
func showOkayCancelActionSheet(_ selectedIndexPath: IndexPath) {
|
||||
let message = NSLocalizedString("A message should be a short, complete sentence.", comment: "")
|
||||
let message = NSLocalizedString("A message needs to be a short, complete sentence.", comment: "")
|
||||
let cancelButtonTitle = NSLocalizedString("Cancel", comment: "")
|
||||
let destructiveButtonTitle = NSLocalizedString("Confirm", comment: "")
|
||||
|
||||
|
|
@ -211,11 +217,11 @@ class AlertControllerViewController: UITableViewController {
|
|||
|
||||
// Create the actions.
|
||||
let cancelAction = UIAlertAction(title: cancelButtonTitle, style: .cancel) { _ in
|
||||
print("The \"OK/Cancel\" alert action sheet's cancel action occurred.")
|
||||
Swift.debugPrint("The \"OK/Cancel\" alert action sheet's cancel action occurred.")
|
||||
}
|
||||
|
||||
let destructiveAction = UIAlertAction(title: destructiveButtonTitle, style: .default) { _ in
|
||||
print("The \"Confirm\" alert action sheet's destructive action occurred.")
|
||||
Swift.debugPrint("The \"Confirm\" alert action sheet's destructive action occurred.")
|
||||
}
|
||||
|
||||
// Add the actions.
|
||||
|
|
@ -238,7 +244,7 @@ class AlertControllerViewController: UITableViewController {
|
|||
|
||||
// Show a dialog with two custom buttons.
|
||||
func showOtherActionSheet(_ selectedIndexPath: IndexPath) {
|
||||
let message = NSLocalizedString("A message should be a short, complete sentence.", comment: "")
|
||||
let message = NSLocalizedString("A message needs to be a short, complete sentence.", comment: "")
|
||||
let destructiveButtonTitle = NSLocalizedString("Destructive Choice", comment: "")
|
||||
let otherButtonTitle = NSLocalizedString("Safe Choice", comment: "")
|
||||
|
||||
|
|
@ -246,10 +252,10 @@ class AlertControllerViewController: UITableViewController {
|
|||
|
||||
// Create the actions.
|
||||
let destructiveAction = UIAlertAction(title: destructiveButtonTitle, style: .destructive) { _ in
|
||||
print("The \"Other\" alert action sheet's destructive action occurred.")
|
||||
Swift.debugPrint("The \"Other\" alert action sheet's destructive action occurred.")
|
||||
}
|
||||
let otherAction = UIAlertAction(title: otherButtonTitle, style: .default) { _ in
|
||||
print("The \"Other\" alert action sheet's other action occurred.")
|
||||
Swift.debugPrint("The \"Other\" alert action sheet's other action occurred.")
|
||||
}
|
||||
|
||||
// Add the actions.
|
||||
|
|
@ -275,6 +281,7 @@ class AlertControllerViewController: UITableViewController {
|
|||
// MARK: - UITableViewDelegate
|
||||
|
||||
extension AlertControllerViewController {
|
||||
|
||||
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
||||
switch indexPath.section {
|
||||
case StyleSections.alertStyleSection.rawValue:
|
||||
|
|
|
|||
|
|
@ -15,4 +15,3 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
|
|
@ -1,23 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "stepper_and_segment_segment_divider_1x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "stepper_and_segment_segment_divider_2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "stepper_and_segment_divider_3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 931 B After Width: | Height: | Size: 931 B |
|
Before Width: | Height: | Size: 931 B After Width: | Height: | Size: 931 B |
|
|
@ -1,23 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "decrement_1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "decrement_2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "stepper_decrement_3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
|
@ -1,23 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "increment_1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "increment_2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "stepper_increment_3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 3 KiB |
|
|
@ -1,23 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "x_icon_1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "x_icon_2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "x_icon_3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
|
@ -1,8 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14800.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="YvC-vN-mSd">
|
||||
<device id="retina4_7" orientation="portrait"/>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19115.3" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="YvC-vN-mSd">
|
||||
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14758.1"/>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19107.5"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
|
|
@ -10,105 +12,104 @@
|
|||
<scene sceneID="umG-hc-QKi">
|
||||
<objects>
|
||||
<tableViewController id="YvC-vN-mSd" customClass="ActivityIndicatorViewController" customModule="UIKitCatalog" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" id="Udh-X7-hOc">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="none" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" id="Udh-X7-hOc">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
|
||||
<sections>
|
||||
<tableViewSection headerTitle="Default" id="9eg-PX-Muo">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="58" id="yn2-Ta-5b4">
|
||||
<rect key="frame" x="0.0" y="55.5" width="375" height="58"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="yn2-Ta-5b4" id="wPg-rJ-XdR">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="58"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="CZW-TS-wTd">
|
||||
<rect key="frame" x="146.5" y="10.5" width="82" height="37"/>
|
||||
<subviews>
|
||||
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="751" verticalHuggingPriority="750" style="gray" translatesAutoresizingMaskIntoConstraints="NO" id="5Na-2m-UBr">
|
||||
<rect key="frame" x="8" y="8" width="20" height="21"/>
|
||||
</activityIndicatorView>
|
||||
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" style="whiteLarge" translatesAutoresizingMaskIntoConstraints="NO" id="M5t-YG-hcB">
|
||||
<rect key="frame" x="36" y="0.0" width="37" height="37"/>
|
||||
</activityIndicatorView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="M5t-YG-hcB" secondAttribute="trailing" constant="9" id="1bF-2T-IsT"/>
|
||||
<constraint firstItem="M5t-YG-hcB" firstAttribute="centerY" secondItem="CZW-TS-wTd" secondAttribute="centerY" id="A4N-by-OTy"/>
|
||||
<constraint firstItem="5Na-2m-UBr" firstAttribute="leading" secondItem="CZW-TS-wTd" secondAttribute="leading" constant="8" id="FBn-Ws-tsw"/>
|
||||
<constraint firstItem="5Na-2m-UBr" firstAttribute="top" secondItem="CZW-TS-wTd" secondAttribute="topMargin" id="MvP-me-LhS"/>
|
||||
<constraint firstAttribute="trailing" secondItem="5Na-2m-UBr" secondAttribute="trailing" constant="54" id="U69-I5-xXs"/>
|
||||
<constraint firstItem="M5t-YG-hcB" firstAttribute="leading" secondItem="5Na-2m-UBr" secondAttribute="trailing" constant="8" id="WAa-aQ-QNn"/>
|
||||
<constraint firstItem="5Na-2m-UBr" firstAttribute="centerY" secondItem="CZW-TS-wTd" secondAttribute="centerY" id="YzJ-Gf-v77"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<prototypes>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="mediumIndicator" id="tgP-Bv-OZJ">
|
||||
<rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="tgP-Bv-OZJ" id="t4n-Fp-hZf">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" style="medium" translatesAutoresizingMaskIntoConstraints="NO" id="BhE-e0-XEQ">
|
||||
<rect key="frame" x="177.5" y="12" width="20" height="20"/>
|
||||
</activityIndicatorView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="BhE-e0-XEQ" firstAttribute="centerY" secondItem="t4n-Fp-hZf" secondAttribute="centerY" id="l0f-Zv-mkO"/>
|
||||
<constraint firstItem="BhE-e0-XEQ" firstAttribute="centerX" secondItem="t4n-Fp-hZf" secondAttribute="centerX" id="pYa-yf-RPH"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="largeTintedIndicator" id="XTJ-Tf-hFJ">
|
||||
<rect key="frame" x="0.0" y="99.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="XTJ-Tf-hFJ" id="XdV-an-jUP">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" style="large" translatesAutoresizingMaskIntoConstraints="NO" id="F4W-ha-d4W">
|
||||
<rect key="frame" x="168" y="-41" width="39" height="126"/>
|
||||
<constraints>
|
||||
<constraint firstItem="CZW-TS-wTd" firstAttribute="centerY" secondItem="wPg-rJ-XdR" secondAttribute="centerY" id="Cy2-2r-1JH"/>
|
||||
<constraint firstItem="CZW-TS-wTd" firstAttribute="top" secondItem="wPg-rJ-XdR" secondAttribute="topMargin" constant="-0.5" id="XUu-jo-iSH"/>
|
||||
<constraint firstItem="CZW-TS-wTd" firstAttribute="centerX" secondItem="wPg-rJ-XdR" secondAttribute="centerX" id="ysP-dk-etz"/>
|
||||
<constraint firstAttribute="width" constant="39" id="U31-3L-4Cp"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
<tableViewSection headerTitle="Tinted" id="fUA-1K-3Rv">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="58" id="z0B-YV-ic1">
|
||||
<rect key="frame" x="0.0" y="161.5" width="375" height="58"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="z0B-YV-ic1" id="stF-iz-x9q">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="58"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="jfs-lj-Sfc">
|
||||
<rect key="frame" x="146" y="10.5" width="83" height="37"/>
|
||||
<subviews>
|
||||
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="751" verticalHuggingPriority="750" style="gray" translatesAutoresizingMaskIntoConstraints="NO" id="wIr-u3-n9x">
|
||||
<rect key="frame" x="9" y="8.5" width="20" height="20"/>
|
||||
</activityIndicatorView>
|
||||
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" style="whiteLarge" translatesAutoresizingMaskIntoConstraints="NO" id="3sQ-iE-m13">
|
||||
<rect key="frame" x="37" y="0.0" width="37" height="37"/>
|
||||
</activityIndicatorView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="wIr-u3-n9x" firstAttribute="leading" secondItem="jfs-lj-Sfc" secondAttribute="leading" constant="9" id="2mc-QB-RED"/>
|
||||
<constraint firstItem="wIr-u3-n9x" firstAttribute="centerY" secondItem="jfs-lj-Sfc" secondAttribute="centerY" id="5Qz-DP-S4N"/>
|
||||
<constraint firstAttribute="trailing" secondItem="wIr-u3-n9x" secondAttribute="trailing" constant="54" id="MTT-x5-NMH"/>
|
||||
<constraint firstItem="3sQ-iE-m13" firstAttribute="leading" secondItem="jfs-lj-Sfc" secondAttribute="leading" constant="37" id="UeD-iL-B9a"/>
|
||||
<constraint firstItem="3sQ-iE-m13" firstAttribute="leading" secondItem="wIr-u3-n9x" secondAttribute="trailing" constant="8" id="Utt-C4-s05"/>
|
||||
<constraint firstItem="3sQ-iE-m13" firstAttribute="centerY" secondItem="jfs-lj-Sfc" secondAttribute="centerY" id="r6x-Qx-NhW"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
</activityIndicatorView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="F4W-ha-d4W" firstAttribute="centerY" secondItem="XdV-an-jUP" secondAttribute="centerY" id="9O7-It-vd3"/>
|
||||
<constraint firstItem="F4W-ha-d4W" firstAttribute="centerX" secondItem="XdV-an-jUP" secondAttribute="centerX" id="QdK-5H-ZrI"/>
|
||||
<constraint firstItem="F4W-ha-d4W" firstAttribute="top" secondItem="XdV-an-jUP" secondAttribute="topMargin" constant="-52" id="ThX-1U-KdZ"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="mediumTintedIndicator" id="V1a-px-nGs">
|
||||
<rect key="frame" x="0.0" y="143.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="V1a-px-nGs" id="EiR-Xd-gjh">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" style="medium" translatesAutoresizingMaskIntoConstraints="NO" id="jSR-AA-dfM">
|
||||
<rect key="frame" x="177.5" y="12" width="20" height="20"/>
|
||||
</activityIndicatorView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="jSR-AA-dfM" firstAttribute="centerX" secondItem="EiR-Xd-gjh" secondAttribute="centerX" id="PJF-Ll-EfR"/>
|
||||
<constraint firstItem="jSR-AA-dfM" firstAttribute="centerY" secondItem="EiR-Xd-gjh" secondAttribute="centerY" id="bzY-9h-zub"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="largeIndicator" id="grT-ev-Cdb">
|
||||
<rect key="frame" x="0.0" y="187.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="grT-ev-Cdb" id="vHi-Pt-8IC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" style="large" translatesAutoresizingMaskIntoConstraints="NO" id="R5k-I2-cs0">
|
||||
<rect key="frame" x="168" y="-41" width="39" height="126"/>
|
||||
<constraints>
|
||||
<constraint firstItem="jfs-lj-Sfc" firstAttribute="centerX" secondItem="stF-iz-x9q" secondAttribute="centerX" id="56m-vE-nN6"/>
|
||||
<constraint firstItem="jfs-lj-Sfc" firstAttribute="top" secondItem="stF-iz-x9q" secondAttribute="topMargin" constant="-0.5" id="KKl-gs-zOA"/>
|
||||
<constraint firstItem="jfs-lj-Sfc" firstAttribute="centerY" secondItem="stF-iz-x9q" secondAttribute="centerY" id="hO9-Dt-132"/>
|
||||
<constraint firstAttribute="width" constant="39" id="YCs-2l-mC1"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
</sections>
|
||||
</activityIndicatorView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="R5k-I2-cs0" firstAttribute="top" secondItem="vHi-Pt-8IC" secondAttribute="topMargin" constant="-52" id="DA1-Oi-JYV"/>
|
||||
<constraint firstItem="R5k-I2-cs0" firstAttribute="centerY" secondItem="vHi-Pt-8IC" secondAttribute="centerY" id="FbR-nl-pCD"/>
|
||||
<constraint firstItem="R5k-I2-cs0" firstAttribute="centerX" secondItem="vHi-Pt-8IC" secondAttribute="centerX" id="aaz-PN-Eme"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</prototypes>
|
||||
<sections/>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="YvC-vN-mSd" id="teo-Yh-WfL"/>
|
||||
<outlet property="delegate" destination="YvC-vN-mSd" id="s5w-Zv-MyP"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
<navigationItem key="navigationItem" title="Activity Indicators" id="Cch-q9-uGA"/>
|
||||
<connections>
|
||||
<outlet property="defaultLargeActivityIndicatorView" destination="M5t-YG-hcB" id="2zA-DO-R8r"/>
|
||||
<outlet property="defaultSmallActivityIndicatorView" destination="5Na-2m-UBr" id="AS0-YP-dxQ"/>
|
||||
<outlet property="tintedLargeActivityIndicatorView" destination="3sQ-iE-m13" id="uJU-XN-Y7A"/>
|
||||
<outlet property="tintedSmallActivityIndicatorView" destination="wIr-u3-n9x" id="zgT-Ua-dnv"/>
|
||||
</connections>
|
||||
</tableViewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dqV-LB-3XC" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-3991.1999999999998" y="2371.6641679160421"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17132" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="gl0-hM-EWg">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19150" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="gl0-hM-EWg">
|
||||
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17105"/>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19134"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
|
|
@ -10,184 +12,427 @@
|
|||
<scene sceneID="q2O-rM-1tM">
|
||||
<objects>
|
||||
<tableViewController id="gl0-hM-EWg" customClass="ButtonViewController" customModule="UIKitCatalog" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" id="gDs-OX-aHt">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="none" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="gDs-OX-aHt">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
|
||||
<sections>
|
||||
<tableViewSection headerTitle="System (Text)" id="ZP1-Vp-Dmj">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="kEp-Mb-jNt">
|
||||
<rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="kEp-Mb-jNt" id="4pA-My-XiJ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4Kt-uW-BR1">
|
||||
<rect key="frame" x="164.5" y="7" width="46" height="30"/>
|
||||
<state key="normal" title="Button"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<prototypes>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="buttonSystemAddContact" id="Hc9-ap-n8A">
|
||||
<rect key="frame" x="0.0" y="49.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Hc9-ap-n8A" id="b9N-g9-uSb">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="contactAdd" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="uCl-YR-FNB">
|
||||
<rect key="frame" x="177.5" y="12" width="20" height="20"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="uCl-YR-FNB" secondAttribute="centerY" id="HMu-7o-czy"/>
|
||||
<constraint firstAttribute="centerX" secondItem="uCl-YR-FNB" secondAttribute="centerX" id="jfo-SY-wKL"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="buttonDetailDisclosure" id="1gE-3k-T9Z">
|
||||
<rect key="frame" x="0.0" y="93.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="1gE-3k-T9Z" id="FrP-gA-38P">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="detailDisclosure" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Glo-Os-pmP">
|
||||
<rect key="frame" x="177.5" y="12" width="20" height="20"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="Glo-Os-pmP" secondAttribute="centerY" id="RmA-0a-mJT"/>
|
||||
<constraint firstAttribute="centerX" secondItem="Glo-Os-pmP" secondAttribute="centerX" id="nSB-wM-z33"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="buttonStyleGray" id="3Ax-m0-9Oh">
|
||||
<rect key="frame" x="0.0" y="137.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="3Ax-m0-9Oh" id="OOg-qg-ztS">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="n1x-US-Vob">
|
||||
<rect key="frame" x="164.5" y="7" width="46" height="30"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="Button"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="n1x-US-Vob" secondAttribute="centerY" id="WT1-zg-S1R"/>
|
||||
<constraint firstAttribute="centerX" secondItem="n1x-US-Vob" secondAttribute="centerX" id="tmz-rn-WTa"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="buttonUpdateActivityHandler" id="9Q3-nJ-bZ5">
|
||||
<rect key="frame" x="0.0" y="181.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="9Q3-nJ-bZ5" id="e9s-It-bBS">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="10" selected="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6GG-7E-4Uz">
|
||||
<rect key="frame" x="164.5" y="7" width="46" height="30"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="Button"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="6GG-7E-4Uz" firstAttribute="centerY" secondItem="e9s-It-bBS" secondAttribute="centerY" id="Vue-pK-cjw"/>
|
||||
<constraint firstItem="6GG-7E-4Uz" firstAttribute="centerX" secondItem="e9s-It-bBS" secondAttribute="centerX" id="coC-Jl-slg"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="buttonAttrText" id="evM-yg-9Yo">
|
||||
<rect key="frame" x="0.0" y="225.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="evM-yg-9Yo" id="94W-qU-eV7">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="BNE-O0-EhQ">
|
||||
<rect key="frame" x="164.5" y="7" width="46" height="30"/>
|
||||
<state key="normal" title="Button"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="BNE-O0-EhQ" secondAttribute="centerY" id="Bf5-x7-mKz"/>
|
||||
<constraint firstAttribute="centerX" secondItem="BNE-O0-EhQ" secondAttribute="centerX" id="qZ7-dH-0MF"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="buttonSymbol" id="glf-vk-VYT">
|
||||
<rect key="frame" x="0.0" y="269.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="glf-vk-VYT" id="kQH-TG-R1o">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Uv9-5g-MMh">
|
||||
<rect key="frame" x="172.5" y="7" width="30" height="30"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="Uv9-5g-MMh" secondAttribute="centerY" id="Hbu-T9-3d7"/>
|
||||
<constraint firstAttribute="centerX" secondItem="Uv9-5g-MMh" secondAttribute="centerX" id="S3Y-fM-MYy"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="addToCartButton" rowHeight="61" id="hjm-If-If6">
|
||||
<rect key="frame" x="0.0" y="313.5" width="375" height="61"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="hjm-If-If6" id="Ss5-YW-ScX">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="61"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hGl-J1-14i">
|
||||
<rect key="frame" x="102.5" y="7.5" width="170" height="46"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="4Kt-uW-BR1" secondAttribute="centerY" id="OGG-gW-auW"/>
|
||||
<constraint firstAttribute="centerX" secondItem="4Kt-uW-BR1" secondAttribute="centerX" id="d8D-yc-Qoo"/>
|
||||
<constraint firstAttribute="width" constant="170" id="2Gt-Eb-4ZX"/>
|
||||
<constraint firstAttribute="height" constant="46" id="qmV-Ea-cyH"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
<tableViewSection headerTitle="System (Contact Add)" id="yhv-dT-Yah">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="h90-Oi-fmq">
|
||||
<rect key="frame" x="0.0" y="147.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="h90-Oi-fmq" id="zIs-mq-UBK">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="contactAdd" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Kaz-JT-zT4">
|
||||
<rect key="frame" x="175" y="10" width="25" height="24"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="hGl-J1-14i" firstAttribute="centerY" secondItem="Ss5-YW-ScX" secondAttribute="centerY" id="XHl-jr-hmI"/>
|
||||
<constraint firstItem="hGl-J1-14i" firstAttribute="centerX" secondItem="Ss5-YW-ScX" secondAttribute="centerX" id="pbE-Fi-hVr"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="buttonMultiTitle" id="mIg-gn-9wM">
|
||||
<rect key="frame" x="0.0" y="374.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="mIg-gn-9wM" id="zbg-lQ-aNN">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0g2-vt-Q3D">
|
||||
<rect key="frame" x="164.5" y="7" width="46" height="30"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="Button"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="0g2-vt-Q3D" firstAttribute="centerY" secondItem="zbg-lQ-aNN" secondAttribute="centerY" id="6xl-GW-Sg1"/>
|
||||
<constraint firstItem="0g2-vt-Q3D" firstAttribute="centerX" secondItem="zbg-lQ-aNN" secondAttribute="centerX" id="a17-mH-qB4"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="buttonSystem" id="udF-ec-G1b">
|
||||
<rect key="frame" x="0.0" y="418.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="udF-ec-G1b" id="Qvd-3e-cWf">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cta-fX-In8">
|
||||
<rect key="frame" x="164.5" y="7" width="46" height="30"/>
|
||||
<state key="normal" title="Button"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="cta-fX-In8" secondAttribute="centerY" id="Aqi-j4-5c8"/>
|
||||
<constraint firstAttribute="centerX" secondItem="cta-fX-In8" secondAttribute="centerX" id="BIA-cd-R7c"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="buttonTitleColor" id="Fyu-fK-gQ6">
|
||||
<rect key="frame" x="0.0" y="462.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Fyu-fK-gQ6" id="bxc-Th-ECF">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="SG9-lq-h4c">
|
||||
<rect key="frame" x="164.5" y="7" width="46" height="30"/>
|
||||
<state key="normal" title="Button"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="SG9-lq-h4c" secondAttribute="centerY" id="uu1-5r-io5"/>
|
||||
<constraint firstAttribute="centerX" secondItem="SG9-lq-h4c" secondAttribute="centerX" id="vcd-kS-xnl"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="buttonUpdateHandler" id="iiH-wp-Mec">
|
||||
<rect key="frame" x="0.0" y="506.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="iiH-wp-Mec" id="cBZ-DP-SQ5">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="10" selected="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="AGF-DC-j4O">
|
||||
<rect key="frame" x="164.5" y="7" width="46" height="30"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="Button"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="AGF-DC-j4O" firstAttribute="centerX" secondItem="cBZ-DP-SQ5" secondAttribute="centerX" id="fUm-0E-Vpj"/>
|
||||
<constraint firstItem="AGF-DC-j4O" firstAttribute="centerY" secondItem="cBZ-DP-SQ5" secondAttribute="centerY" id="lRU-EM-elF"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="buttonToggle" id="B0b-CB-gDT">
|
||||
<rect key="frame" x="0.0" y="550.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="B0b-CB-gDT" id="bEk-py-CdA">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8bp-hm-SGp">
|
||||
<rect key="frame" x="164" y="7" width="47" height="30"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="Toggle"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="8bp-hm-SGp" firstAttribute="centerY" secondItem="bEk-py-CdA" secondAttribute="centerY" id="JiW-Y6-fkN"/>
|
||||
<constraint firstItem="8bp-hm-SGp" firstAttribute="centerX" secondItem="bEk-py-CdA" secondAttribute="centerX" id="pcA-he-Seb"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="buttonImageUpdateHandler" id="46M-T7-Oy3">
|
||||
<rect key="frame" x="0.0" y="594.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="46M-T7-Oy3" id="U4f-oa-jHI">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FMl-bN-Rmn">
|
||||
<rect key="frame" x="164" y="7" width="47" height="30"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="Toggle"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="FMl-bN-Rmn" firstAttribute="centerY" secondItem="U4f-oa-jHI" secondAttribute="centerY" id="5je-2D-3Xu"/>
|
||||
<constraint firstItem="FMl-bN-Rmn" firstAttribute="centerX" secondItem="U4f-oa-jHI" secondAttribute="centerX" id="tIt-yz-D7j"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="buttonTextSymbol" id="YHo-tf-ujm">
|
||||
<rect key="frame" x="0.0" y="638.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="YHo-tf-ujm" id="PW5-BM-zHa">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="LSV-c2-qif">
|
||||
<rect key="frame" x="164.5" y="7" width="46" height="30"/>
|
||||
<state key="normal" title="Button"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="LSV-c2-qif" secondAttribute="centerY" id="755-gU-ITh"/>
|
||||
<constraint firstAttribute="centerX" secondItem="LSV-c2-qif" secondAttribute="centerX" id="UMP-wV-Nfg"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="buttonSymbolText" id="Swz-Wm-Uje" userLabel="buttonSymbolText">
|
||||
<rect key="frame" x="0.0" y="682.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Swz-Wm-Uje" id="07H-tv-wPH">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XQY-49-CgB">
|
||||
<rect key="frame" x="164.5" y="7" width="46" height="30"/>
|
||||
<state key="normal" title="Button"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerX" secondItem="XQY-49-CgB" secondAttribute="centerX" id="8L1-II-o1H"/>
|
||||
<constraint firstAttribute="centerY" secondItem="XQY-49-CgB" secondAttribute="centerY" id="ubG-it-P9J"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="buttonBackground" id="eUl-MC-eCP">
|
||||
<rect key="frame" x="0.0" y="726.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="eUl-MC-eCP" id="OEk-Cd-u2y">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Vm1-an-lht">
|
||||
<rect key="frame" x="164.5" y="7" width="46" height="30"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="Button"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="Vm1-an-lht" firstAttribute="centerX" secondItem="OEk-Cd-u2y" secondAttribute="centerX" id="KFZ-Bs-Bo8"/>
|
||||
<constraint firstItem="Vm1-an-lht" firstAttribute="centerY" secondItem="OEk-Cd-u2y" secondAttribute="centerY" id="nAv-UD-aUy"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="buttonClose" id="y0n-GV-c2A">
|
||||
<rect key="frame" x="0.0" y="770.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="y0n-GV-c2A" id="fIA-5C-eqH">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="close" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="O6l-mq-E45">
|
||||
<rect key="frame" x="172.5" y="7" width="30" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerX" secondItem="Kaz-JT-zT4" secondAttribute="centerX" id="NLz-rT-HFS"/>
|
||||
<constraint firstAttribute="centerY" secondItem="Kaz-JT-zT4" secondAttribute="centerY" id="ijD-77-x7g"/>
|
||||
<constraint firstAttribute="width" constant="30" id="tte-Nq-wRc"/>
|
||||
<constraint firstAttribute="height" constant="30" id="xb7-U5-TUD"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
<tableViewSection headerTitle="System (Detail Disclosure)" id="Uaa-gd-ORk">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="Zoj-H2-9xS">
|
||||
<rect key="frame" x="0.0" y="239.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Zoj-H2-9xS" id="kOh-TM-Vhn">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="detailDisclosure" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="1kk-qb-b6p">
|
||||
<rect key="frame" x="175" y="10" width="25" height="24"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerX" secondItem="O6l-mq-E45" secondAttribute="centerX" id="QXl-p2-0Fb"/>
|
||||
<constraint firstAttribute="centerY" secondItem="O6l-mq-E45" secondAttribute="centerY" id="aDg-eV-F5N"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="buttonLargeSymbol" id="apZ-sG-DvC">
|
||||
<rect key="frame" x="0.0" y="814.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="apZ-sG-DvC" id="5Kr-vf-LZQ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vvm-ds-MdT">
|
||||
<rect key="frame" x="172.5" y="7" width="30" height="30"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerX" secondItem="vvm-ds-MdT" secondAttribute="centerX" id="DfF-1y-bgf"/>
|
||||
<constraint firstAttribute="centerY" secondItem="vvm-ds-MdT" secondAttribute="centerY" id="KOh-Hz-ZwM"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="buttonStyleTinted" id="H4z-4N-xoc">
|
||||
<rect key="frame" x="0.0" y="858.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="H4z-4N-xoc" id="2dD-bd-cHm">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="shq-FQ-9Zh">
|
||||
<rect key="frame" x="164.5" y="7" width="46" height="30"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="Button"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="shq-FQ-9Zh" secondAttribute="centerY" id="ZYG-xE-ZE2"/>
|
||||
<constraint firstAttribute="centerX" secondItem="shq-FQ-9Zh" secondAttribute="centerX" id="zJC-IO-ElU"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="buttonStyleFilled" id="ORZ-cZ-J2f">
|
||||
<rect key="frame" x="0.0" y="902.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ORZ-cZ-J2f" id="2vQ-e3-R0m">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Pf2-03-Ttu">
|
||||
<rect key="frame" x="164.5" y="7" width="46" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerX" secondItem="1kk-qb-b6p" secondAttribute="centerX" id="6JK-8x-4Wp"/>
|
||||
<constraint firstAttribute="centerY" secondItem="1kk-qb-b6p" secondAttribute="centerY" id="frb-Yq-Tu9"/>
|
||||
<constraint firstAttribute="height" constant="30" id="1FC-9e-5z4"/>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="46" id="xlx-v7-ukl"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
<tableViewSection headerTitle="Image" id="g6U-rt-rxY">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="FHo-QU-Dbd">
|
||||
<rect key="frame" x="0.0" y="331.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="FHo-QU-Dbd" id="kI0-Vx-CmV">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="W4I-NX-srt">
|
||||
<rect key="frame" x="172.5" y="5" width="30" height="34"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="W4I-NX-srt" firstAttribute="centerY" secondItem="kI0-Vx-CmV" secondAttribute="centerY" id="3JW-rC-ZTg"/>
|
||||
<constraint firstItem="W4I-NX-srt" firstAttribute="centerX" secondItem="kI0-Vx-CmV" secondAttribute="centerX" id="UlE-gj-Jmh"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
<tableViewSection headerTitle="Attributed Text" id="Orn-0a-yT5">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="aNB-XX-idG">
|
||||
<rect key="frame" x="0.0" y="423.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="aNB-XX-idG" id="zVr-S5-LW6">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ynp-Un-3Nj">
|
||||
<rect key="frame" x="164.5" y="7" width="46" height="30"/>
|
||||
<state key="normal" title="Button"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="ynp-Un-3Nj" secondAttribute="centerY" id="eg6-fR-ae7"/>
|
||||
<constraint firstAttribute="centerX" secondItem="ynp-Un-3Nj" secondAttribute="centerX" id="irC-vH-juQ"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
<tableViewSection headerTitle="System (Symbol)" id="YPO-DM-d7b">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="nch-0K-etg">
|
||||
<rect key="frame" x="0.0" y="515.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="nch-0K-etg" id="9tf-qq-iAy">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="QwT-La-9Hy">
|
||||
<rect key="frame" x="172.5" y="7" width="30" height="30"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="QwT-La-9Hy" secondAttribute="centerY" id="ZXe-oo-R9a"/>
|
||||
<constraint firstAttribute="centerX" secondItem="QwT-La-9Hy" secondAttribute="centerX" id="iTr-X3-rKh"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
<tableViewSection headerTitle="System (Text + Symbol)" id="Foz-RV-Pf7">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="efR-L3-lDw">
|
||||
<rect key="frame" x="0.0" y="607.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="efR-L3-lDw" id="ZyN-Rl-rCp">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oaQ-1y-atp">
|
||||
<rect key="frame" x="164.5" y="7" width="46" height="30"/>
|
||||
<state key="normal" title="Button"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="oaQ-1y-atp" secondAttribute="centerY" id="mYE-T6-yLW"/>
|
||||
<constraint firstAttribute="centerX" secondItem="oaQ-1y-atp" secondAttribute="centerX" id="qKh-qB-Zu9"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
<tableViewSection headerTitle="System (Menu)" id="JI3-Nv-lhU" userLabel="System (Menu)">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="5do-Y4-XZ3">
|
||||
<rect key="frame" x="0.0" y="699.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="5do-Y4-XZ3" id="SkS-Fh-7aO">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="e8l-iZ-Xgp">
|
||||
<rect key="frame" x="164.5" y="7" width="46" height="30"/>
|
||||
<state key="normal" title="Button"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="e8l-iZ-Xgp" secondAttribute="centerY" id="TJT-8l-A9J"/>
|
||||
<constraint firstAttribute="centerX" secondItem="e8l-iZ-Xgp" secondAttribute="centerX" id="j0q-Fg-J0m"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
</sections>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="Button"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="Pf2-03-Ttu" secondAttribute="centerY" id="FvB-vF-OAd"/>
|
||||
<constraint firstAttribute="centerX" secondItem="Pf2-03-Ttu" secondAttribute="centerX" id="fpy-D4-Rpb"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="buttonImage" id="fAD-Wv-wU1">
|
||||
<rect key="frame" x="0.0" y="946.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="fAD-Wv-wU1" id="Jyv-wE-NZ7">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="c3R-k9-JaH">
|
||||
<rect key="frame" x="172.5" y="5" width="30" height="34"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="c3R-k9-JaH" firstAttribute="centerX" secondItem="Jyv-wE-NZ7" secondAttribute="centerX" id="S8V-2j-3R4"/>
|
||||
<constraint firstItem="c3R-k9-JaH" firstAttribute="centerY" secondItem="Jyv-wE-NZ7" secondAttribute="centerY" id="qAd-0h-4Xg"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="buttonCornerStyle" id="r1g-kE-qzu">
|
||||
<rect key="frame" x="0.0" y="990.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="r1g-kE-qzu" id="sHD-bp-X5L">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="akL-cx-LFf">
|
||||
<rect key="frame" x="164.5" y="7" width="46" height="30"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="Button"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="akL-cx-LFf" firstAttribute="centerX" secondItem="sHD-bp-X5L" secondAttribute="centerX" id="K8n-kN-9cY"/>
|
||||
<constraint firstItem="akL-cx-LFf" firstAttribute="centerY" secondItem="sHD-bp-X5L" secondAttribute="centerY" id="MfJ-hf-qWO"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</prototypes>
|
||||
<sections/>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="gl0-hM-EWg" id="CGJ-ZK-3Nr"/>
|
||||
<outlet property="delegate" destination="gl0-hM-EWg" id="fqM-wz-bSp"/>
|
||||
|
|
@ -195,16 +440,6 @@
|
|||
</tableView>
|
||||
<navigationItem key="navigationItem" title="Buttons" id="NGY-Dv-sY9"/>
|
||||
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
|
||||
<connections>
|
||||
<outlet property="attributedTextButton" destination="ynp-Un-3Nj" id="GnF-wA-dTM"/>
|
||||
<outlet property="imageButton" destination="W4I-NX-srt" id="4p1-oE-iSs"/>
|
||||
<outlet property="menuButton" destination="e8l-iZ-Xgp" id="QPX-YE-FIT"/>
|
||||
<outlet property="symbolButton" destination="QwT-La-9Hy" id="sIN-Di-Y0D"/>
|
||||
<outlet property="symbolTextButton" destination="oaQ-1y-atp" id="Xem-ED-whh"/>
|
||||
<outlet property="systemContactAddButton" destination="Kaz-JT-zT4" id="U38-FM-tgn"/>
|
||||
<outlet property="systemDetailDisclosureButton" destination="1kk-qb-b6p" id="hCA-Ru-6aE"/>
|
||||
<outlet property="systemTextButton" destination="4Kt-uW-BR1" id="BdS-qx-wTr"/>
|
||||
</connections>
|
||||
</tableViewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="w5U-DZ-TWT" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
|
|
@ -212,8 +447,8 @@
|
|||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<systemColor name="groupTableViewBackgroundColor">
|
||||
<color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
{\rtf1\ansi\ansicpg1252\cocoartf2513
|
||||
{\rtf1\ansi\ansicpg1252\cocoartf2617
|
||||
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
|
||||
{\colortbl;\red255\green255\blue255;\red0\green0\blue0;}
|
||||
{\*\expandedcolortbl;;\cssrgb\c0\c0\c0\cname textColor;}
|
||||
\vieww9000\viewh8400\viewkind0
|
||||
\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\qc\partightenfactor0
|
||||
|
||||
\f0\fs20 \cf2 Demonstrates how to use UIKit's views, controls and pickers.\
|
||||
\f0\fs20 \cf2 Demonstrates how to use {\field{\*\fldinst{HYPERLINK "https://developer.apple.com/documentation/uikit"}}{\fldrslt UIKit}}\
|
||||
views, controls and pickers.\
|
||||
}
|
||||
|
|
@ -1,8 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14810.12" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="XCI-A9-c2M">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19115.3" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="XCI-A9-c2M">
|
||||
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14766.15"/>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19107.5"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
|
|
@ -13,7 +15,7 @@
|
|||
<imageView key="view" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" id="InE-1J-uPb">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
</imageView>
|
||||
<toolbarItems/>
|
||||
<navigationItem key="navigationItem" title="Image View" id="1uT-59-ex0"/>
|
||||
|
|
@ -25,4 +27,9 @@
|
|||
<point key="canvasLocation" x="-684" y="3368"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
|
|||
|
|
@ -5,5 +5,5 @@ Abstract:
|
|||
Localized versions of Info.plist keys.
|
||||
*/
|
||||
|
||||
CFBundleGetInfoString = "v16.0, Copyright 2008-2020, Apple Inc.";
|
||||
NSHumanReadableCopyright = "Copyright © 2008-2020, Apple Inc.";
|
||||
CFBundleGetInfoString = "v16.0, Copyright 2008-2021, Apple Inc.";
|
||||
NSHumanReadableCopyright = "Copyright © 2008-2021, Apple Inc.";
|
||||
|
|
|
|||
|
|
@ -11,10 +11,11 @@ Strings used across the application via the NSLocalizedString API.
|
|||
"Destructive Choice" = "Destructive Choice";
|
||||
"Safe Choice" = "Safe Choice";
|
||||
"A Short Title Is Best" = "A Short Title Is Best";
|
||||
"A message should be a short, complete sentence." = "A message should be a short, complete sentence.";
|
||||
"A message needs to be a short, complete sentence." = "A message needs to be a short, complete sentence.";
|
||||
"Choice One" = "Choice One";
|
||||
"Choice Two" = "Choice Two";
|
||||
"Button" = "Button";
|
||||
"Pressed" = "Pressed";
|
||||
"X Button" = "X Button";
|
||||
"Image" = "Image";
|
||||
"bold" = "bold";
|
||||
|
|
@ -26,7 +27,7 @@ Strings used across the application via the NSLocalizedString API.
|
|||
"Red color component value" = "Red color component value";
|
||||
"Green color component value" = "Green color component value";
|
||||
"Blue color component value" = "Blue color component value";
|
||||
"Animated images" = "Animated images";
|
||||
"Animated" = "A slide show of images";
|
||||
|
||||
"Airplane" = "Airplane";
|
||||
"Gift" = "Gift";
|
||||
|
|
@ -35,6 +36,8 @@ Strings used across the application via the NSLocalizedString API.
|
|||
"An error occurred:" = "An error occurred:";
|
||||
|
||||
"ButtonsTitle" = "Buttons";
|
||||
"MenuButtonsTitle" = "Menu Buttons";
|
||||
"PointerInteractionButtonsTitle" = "Pointer Interaction";
|
||||
"PageControlTitle" = "Page Controls";
|
||||
"SearchBarsTitle" = "Search Bars";
|
||||
"SegmentedControlsTitle" = "Segmented Controls";
|
||||
|
|
@ -45,11 +48,16 @@ Strings used across the application via the NSLocalizedString API.
|
|||
|
||||
"ActivityIndicatorsTitle" = "Activity Indicators";
|
||||
"AlertControllersTitle" = "Alert Controllers";
|
||||
|
||||
"ImagesTitle" = "Image Views";
|
||||
"ImageViewTitle" = "Image View";
|
||||
"SymbolsTitle" = "SF Symbol";
|
||||
|
||||
"ProgressViewsTitle" = "Progress Views";
|
||||
"StackViewsTitle" = "Stack Views";
|
||||
"TextViewTitle" = "Text View";
|
||||
"ToolbarsTitle" = "Toolbars";
|
||||
"VisualEffectTitle" = "Visual Effect";
|
||||
"WebViewTitle" = "Web View";
|
||||
|
||||
"DatePickerTitle" = "Date Picker";
|
||||
|
|
@ -79,3 +87,87 @@ Strings used across the application via the NSLocalizedString API.
|
|||
|
||||
"SwitchTitle" = "Title";
|
||||
|
||||
"DefaultSwitchTitle" = "Default";
|
||||
"CheckboxSwitchTitle" = "Checkbox";
|
||||
"TintedSwitchTitle" = "Tinted";
|
||||
|
||||
"ImageToolTipTitle" = "This is a list of flower photos obtained from the sample's asset library.";
|
||||
"GrayStyleButtonToolTipTitle" = "This is a gray-style system button.";
|
||||
"TintedStyleButtonToolTipTitle" = "This is a tinted-style system button.";
|
||||
"FilledStyleButtonToolTipTitle" = "This is a filled-style system button.";
|
||||
"CapsuleStyleButtonToolTipTitle" = "This is a capsule-style system button.";
|
||||
"CartFilledButtonToolTipTitle" = "Button cart is filled";
|
||||
"CartEmptyButtonToolTipTitle" = "Button cart is empty";
|
||||
"XButtonToolTipTitle" = "X Button";
|
||||
"PersonButtonToolTipTitle" = "Person Button";
|
||||
"VisualEffectToolTipTitle" = "This demonstrates how to use a UIVisualEffectView on top of an UIImageView and underneath a UITextView.";
|
||||
|
||||
"VisualEffectTextContent" = "This is a UITextView with text content placed inside a UIVisualEffectView. This is a UITextView with text content placed inside a UIVisualEffectView. This is a UITextView with text content placed inside a UIVisualEffectView.";
|
||||
|
||||
"DefaultTitle" = "Default";
|
||||
"DetailDisclosureTitle" = "Detail Disclosure";
|
||||
"AddContactTitle" = "Add Contact";
|
||||
"CloseTitle" = "Close";
|
||||
"GrayTitle" = "Gray";
|
||||
"TintedTitle" = "Tinted";
|
||||
"FilledTitle" = "Filled";
|
||||
"CornerStyleTitle" = "Corner Style";
|
||||
"ToggleTitle" = "Toggle";
|
||||
"ButtonColorTitle" = "Colored Title";
|
||||
|
||||
"ImageTitle" = "Image";
|
||||
"AttributedStringTitle" = "Attributed String";
|
||||
"SymbolTitle" = "Symbol";
|
||||
|
||||
"LargeSymbolTitle" = "Large Symbol";
|
||||
"SymbolStringTitle" = "Symbol + String";
|
||||
"StringSymbolTitle" = "String + Symbol";
|
||||
"MultiTitleTitle" = "Multi-Title";
|
||||
"BackgroundTitle" = "Background";
|
||||
|
||||
"UpdateActivityHandlerTitle" = "Update Activity Handler";
|
||||
"UpdateHandlerTitle" = "Update Handler";
|
||||
"UpdateImageHandlerTitle" = "Update Handler (Button Image)";
|
||||
|
||||
"AddToCartTitle" = "Add to Cart";
|
||||
|
||||
"DropDownTitle" = "Drop Down";
|
||||
"DropDownProgTitle" = "Drop Down Programmatic";
|
||||
"DropDownMultiActionTitle" = "Drop Down Multi-Action";
|
||||
"DropDownButtonSubMenuTitle" = "Drop Down Submenu";
|
||||
"PopupSelection" = "Popup Selection";
|
||||
"PopupMenuTitle" = "Popup Menu";
|
||||
|
||||
"CustomSegmentsTitle" = "Custom Segments";
|
||||
"CustomBackgroundTitle" = "Custom Background";
|
||||
"ActionBasedTitle" = "Action Based";
|
||||
|
||||
"CustomTitle" = "Custom";
|
||||
"MinMaxImagesTitle" = "Min and Max Images";
|
||||
|
||||
"DefaultStepperTitle" = "Default Stepper";
|
||||
"TintedStepperTitle" = "Tinted Stepper";
|
||||
"CustomStepperTitle" = "Custom Stepper";
|
||||
|
||||
"PlainSymbolTitle" = "Default";
|
||||
"TintedSymbolTitle" = "Tinted";
|
||||
"LargeSymbolTitle" = "Large";
|
||||
"HierarchicalSymbolTitle" = "Hierarchical Color";
|
||||
"PaletteSymbolTitle" = "Palette Color";
|
||||
"PreferringMultiColorSymbolTitle" = "Preferring Multi-Color";
|
||||
|
||||
"DefaultTextFieldTitle" = "Default";
|
||||
"TintedTextFieldTitle" = "Tinted";
|
||||
"SecuretTextFieldTitle" = "Secure";
|
||||
"SpecificKeyboardTextFieldTitle" = "Specific Keyboard";
|
||||
"CustomTextFieldTitle" = "Custom";
|
||||
"SearchTextFieldTitle" = "Search";
|
||||
|
||||
"MediumIndicatorTitle" = "Medium";
|
||||
"LargeIndicatorTitle" = "Large";
|
||||
"MediumTintedIndicatorTitle" = "Medium Tinted";
|
||||
"LargeTintedIndicatorTitle" = "Large Tinted";
|
||||
|
||||
"ProgressDefaultTitle" = "Default";
|
||||
"ProgressBarTitle" = "Bar";
|
||||
"ProgressTintedTitle" = "Tinted";
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17132" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Q5k-7y-PTc">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Q5k-7y-PTc">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17105"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="UIKitCatalog" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="m5D-3A-LEm">
|
||||
<rect key="frame" x="135.5" y="459" width="143" height="32"/>
|
||||
<rect key="frame" x="136" y="459" width="142" height="32"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="26"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
|
|
@ -86,7 +86,7 @@
|
|||
<!--Split View Controller-->
|
||||
<scene sceneID="Gcq-1L-4zA">
|
||||
<objects>
|
||||
<splitViewController storyboardIdentifier="SplitViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="Q5k-7y-PTc" sceneMemberID="viewController">
|
||||
<splitViewController storyboardIdentifier="SplitViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" allowDoubleColumnStyle="YES" id="Q5k-7y-PTc" sceneMemberID="viewController">
|
||||
<connections>
|
||||
<segue destination="EaT-6K-bcl" kind="relationship" relationship="masterViewController" id="oIB-IV-bsO"/>
|
||||
<segue destination="TZt-fA-39O" kind="relationship" relationship="detailViewController" id="mju-NL-Hfj"/>
|
||||
|
|
|
|||
112
UIKitCatalog/Base.lproj/MenuButtonViewController.storyboard
Executable file
|
|
@ -0,0 +1,112 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19115.3" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="gl0-hM-EWg">
|
||||
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19107.5"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Menu Buttons-->
|
||||
<scene sceneID="q2O-rM-1tM">
|
||||
<objects>
|
||||
<tableViewController id="gl0-hM-EWg" customClass="MenuButtonViewController" customModule="UIKitCatalog" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="none" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="gDs-OX-aHt">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<prototypes>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="buttonMenuProgrammatic" id="tN7-4A-EJH">
|
||||
<rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="tN7-4A-EJH" id="yGc-Mk-Twi">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="QZo-rY-vLM">
|
||||
<rect key="frame" x="149" y="7" width="77" height="30"/>
|
||||
<state key="normal" title="Drop Down"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="QZo-rY-vLM" secondAttribute="centerY" id="MId-Gu-fRO"/>
|
||||
<constraint firstAttribute="centerX" secondItem="QZo-rY-vLM" secondAttribute="centerX" id="QM1-sK-LxP"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="buttonMenuMultiAction" id="Cw4-YD-BX7">
|
||||
<rect key="frame" x="0.0" y="99.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Cw4-YD-BX7" id="3at-s1-SCP">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Wka-9Z-mxt">
|
||||
<rect key="frame" x="149" y="7" width="77" height="30"/>
|
||||
<state key="normal" title="Drop Down"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="Wka-9Z-mxt" secondAttribute="centerY" id="0kE-RS-bqR"/>
|
||||
<constraint firstAttribute="centerX" secondItem="Wka-9Z-mxt" secondAttribute="centerX" id="uvJ-vH-8Sb"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="buttonSubMenu" id="CVF-id-q0u" userLabel="buttonSubMenu">
|
||||
<rect key="frame" x="0.0" y="143.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="CVF-id-q0u" id="NLf-69-z9K">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="aE4-WC-Vzw">
|
||||
<rect key="frame" x="114.5" y="7" width="146" height="30"/>
|
||||
<state key="normal" title="Drop Down Submenu"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="aE4-WC-Vzw" secondAttribute="centerY" id="ZRN-Hh-arg"/>
|
||||
<constraint firstAttribute="centerX" secondItem="aE4-WC-Vzw" secondAttribute="centerX" id="kV7-PG-ktm"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="buttonMenuSelection" id="YJK-57-pcc" userLabel="buttonMenuSelection">
|
||||
<rect key="frame" x="0.0" y="187.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="YJK-57-pcc" id="K6l-99-WRN">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FVf-eR-tCD">
|
||||
<rect key="frame" x="149" y="7" width="77" height="30"/>
|
||||
<state key="normal" title="Drop Down"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="FVf-eR-tCD" secondAttribute="centerY" id="9tB-zR-p5q"/>
|
||||
<constraint firstAttribute="centerX" secondItem="FVf-eR-tCD" secondAttribute="centerX" id="eaW-aJ-i3A"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</prototypes>
|
||||
<sections/>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="gl0-hM-EWg" id="CGJ-ZK-3Nr"/>
|
||||
<outlet property="delegate" destination="gl0-hM-EWg" id="fqM-wz-bSp"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
<navigationItem key="navigationItem" title="Menu Buttons" id="NGY-Dv-sY9"/>
|
||||
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
|
||||
</tableViewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="w5U-DZ-TWT" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-2594.4000000000001" y="3367.4662668665669"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
165
UIKitCatalog/Base.lproj/PointerInteractionButtonViewController.storyboard
Executable file
|
|
@ -0,0 +1,165 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19115.3" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="gl0-hM-EWg">
|
||||
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19107.5"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="UIMenu" message="Requires Xcode 11 or later." minToolsVersion="11.0" requiredIntegratedClassName="UICommandDiff"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Pointer Interaction Buttons-->
|
||||
<scene sceneID="q2O-rM-1tM">
|
||||
<objects>
|
||||
<tableViewController id="gl0-hM-EWg" customClass="PointerInteractionButtonViewController" customModule="UIKitCatalog" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="none" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="gDs-OX-aHt">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<prototypes>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="buttonCustom" id="KOM-J3-5Ux">
|
||||
<rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KOM-J3-5Ux" id="u18-q2-hnF">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" tag="5" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="IId-SH-Rqm">
|
||||
<rect key="frame" x="123.5" y="7" width="128" height="30"/>
|
||||
<color key="backgroundColor" systemColor="systemYellowColor"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="128" id="J1K-wu-P8L"/>
|
||||
</constraints>
|
||||
<state key="normal" title="Custom"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="IId-SH-Rqm" secondAttribute="centerY" id="IK3-dx-vXu"/>
|
||||
<constraint firstAttribute="centerX" secondItem="IId-SH-Rqm" secondAttribute="centerX" id="f7i-So-Kyq"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="buttonHighlight" id="ORa-iG-qeh">
|
||||
<rect key="frame" x="0.0" y="99.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ORa-iG-qeh" id="avE-6x-iRU">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" tag="2" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8fo-ul-JWM">
|
||||
<rect key="frame" x="123.5" y="7" width="128" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="128" id="n3U-8w-Zoz"/>
|
||||
</constraints>
|
||||
<state key="normal" title="Highlight"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="8fo-ul-JWM" secondAttribute="centerY" id="WTf-Fw-uNH"/>
|
||||
<constraint firstAttribute="centerX" secondItem="8fo-ul-JWM" secondAttribute="centerX" id="iGp-Rn-AUA"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="buttonPointer" id="c6X-TL-Sjt">
|
||||
<rect key="frame" x="0.0" y="143.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="c6X-TL-Sjt" id="IY7-D9-hze">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" tag="1" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="TIQ-pG-2ex">
|
||||
<rect key="frame" x="123.5" y="7" width="128" height="30"/>
|
||||
<color key="backgroundColor" systemColor="systemGray5Color"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="128" id="w4A-Zd-v8j"/>
|
||||
</constraints>
|
||||
<menu key="menu" title="Sub Menu" id="AF4-PH-xKY">
|
||||
<children>
|
||||
<command title="Item 1" id="YCh-i1-IYN"/>
|
||||
<command title="Item 2" id="B4C-4W-Nwi"/>
|
||||
</children>
|
||||
</menu>
|
||||
<state key="normal" title="Automatic"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="TIQ-pG-2ex" secondAttribute="centerY" id="Dp9-cf-jqY"/>
|
||||
<constraint firstAttribute="centerX" secondItem="TIQ-pG-2ex" secondAttribute="centerX" id="zIL-SV-vhT"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="buttonHover" id="9QG-Ha-ThK">
|
||||
<rect key="frame" x="0.0" y="187.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="9QG-Ha-ThK" id="PDE-Dl-GIA">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" tag="4" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="HcB-Pc-F7S">
|
||||
<rect key="frame" x="123.5" y="7" width="128" height="30"/>
|
||||
<color key="backgroundColor" systemColor="systemGray5Color"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="128" id="8RS-Xt-TgA"/>
|
||||
</constraints>
|
||||
<state key="normal" title="Hover"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerX" secondItem="HcB-Pc-F7S" secondAttribute="centerX" id="FlI-zr-0md"/>
|
||||
<constraint firstAttribute="centerY" secondItem="HcB-Pc-F7S" secondAttribute="centerY" id="wh7-pC-kEM"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="buttonLift" id="tWT-F9-hmA">
|
||||
<rect key="frame" x="0.0" y="231.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="tWT-F9-hmA" id="7RG-VE-xq6">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" tag="3" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3iy-NN-Rbl">
|
||||
<rect key="frame" x="123.5" y="7" width="128" height="30"/>
|
||||
<color key="backgroundColor" systemColor="systemTealColor"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="128" id="LaE-N4-VI9"/>
|
||||
</constraints>
|
||||
<state key="normal" title="Lift"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerX" secondItem="3iy-NN-Rbl" secondAttribute="centerX" id="7Np-zC-KJ9"/>
|
||||
<constraint firstAttribute="centerY" secondItem="3iy-NN-Rbl" secondAttribute="centerY" id="NJ5-fD-Uqb"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</prototypes>
|
||||
<sections/>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="gl0-hM-EWg" id="CGJ-ZK-3Nr"/>
|
||||
<outlet property="delegate" destination="gl0-hM-EWg" id="fqM-wz-bSp"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
<navigationItem key="navigationItem" title="Pointer Interaction Buttons" id="NGY-Dv-sY9"/>
|
||||
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
|
||||
</tableViewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="w5U-DZ-TWT" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-2594.4000000000001" y="3367.4662668665669"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
<systemColor name="systemGray5Color">
|
||||
<color red="0.89803921568627454" green="0.89803921568627454" blue="0.91764705882352937" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
<systemColor name="systemTealColor">
|
||||
<color red="0.18823529411764706" green="0.69019607843137254" blue="0.7803921568627451" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
<systemColor name="systemYellowColor">
|
||||
<color red="1" green="0.80000000000000004" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
@ -1,8 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14800.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="aY0-FD-8DD">
|
||||
<device id="retina4_7" orientation="portrait"/>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19142.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="aY0-FD-8DD">
|
||||
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14758.1"/>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19142.2"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
|
|
@ -10,83 +12,70 @@
|
|||
<scene sceneID="lvJ-t8-0eN">
|
||||
<objects>
|
||||
<tableViewController id="aY0-FD-8DD" customClass="ProgressViewController" customModule="UIKitCatalog" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" id="vxe-YC-yBi">
|
||||
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="none" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" id="vxe-YC-yBi">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
|
||||
<sections>
|
||||
<tableViewSection headerTitle="Default" id="eUe-E8-yfw">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="kmi-xt-LTG">
|
||||
<rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="kmi-xt-LTG" id="FJn-D1-Mek">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<progressView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" progress="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="ei4-Kf-1yF">
|
||||
<rect key="frame" x="20" y="21" width="335" height="2"/>
|
||||
</progressView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="ei4-Kf-1yF" secondAttribute="centerY" id="19T-l6-w2Z"/>
|
||||
<constraint firstItem="ei4-Kf-1yF" firstAttribute="leading" secondItem="FJn-D1-Mek" secondAttribute="leading" constant="20" symbolic="YES" id="996-hT-SEd"/>
|
||||
<constraint firstAttribute="trailing" secondItem="ei4-Kf-1yF" secondAttribute="trailing" constant="20" symbolic="YES" id="X0O-1q-n6K"/>
|
||||
<constraint firstItem="ei4-Kf-1yF" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="FJn-D1-Mek" secondAttribute="leading" constant="20" id="yYu-XW-UDu"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
<tableViewSection headerTitle="Bar" id="bKC-KS-IHM">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="8gd-go-6HH">
|
||||
<rect key="frame" x="0.0" y="147.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="8gd-go-6HH" id="s1D-qX-CZU">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<progressView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" progressViewStyle="bar" progress="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="zOW-ND-gMa">
|
||||
<rect key="frame" x="20" y="21.5" width="340" height="2.5"/>
|
||||
</progressView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerX" secondItem="zOW-ND-gMa" secondAttribute="centerX" constant="-2.5" id="0Kg-bD-Z29"/>
|
||||
<constraint firstAttribute="centerY" secondItem="zOW-ND-gMa" secondAttribute="centerY" id="0eX-Wt-3bc"/>
|
||||
<constraint firstItem="zOW-ND-gMa" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="s1D-qX-CZU" secondAttribute="leading" constant="20" id="ABx-O0-dxH"/>
|
||||
<constraint firstItem="zOW-ND-gMa" firstAttribute="leading" secondItem="s1D-qX-CZU" secondAttribute="leading" constant="20" id="KQ9-r2-iz2"/>
|
||||
<constraint firstAttribute="trailing" secondItem="zOW-ND-gMa" secondAttribute="trailing" constant="15" id="an4-J8-8Nv"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
<tableViewSection headerTitle="Tinted" id="xT2-F1-qKq">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="e4s-Qv-cWn">
|
||||
<rect key="frame" x="0.0" y="239.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="e4s-Qv-cWn" id="U7H-qE-1Eb">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<progressView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" progress="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="hce-gL-kyl">
|
||||
<rect key="frame" x="20" y="21" width="340" height="2"/>
|
||||
</progressView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="hce-gL-kyl" secondAttribute="centerY" id="28r-KD-u2o"/>
|
||||
<constraint firstAttribute="centerX" secondItem="hce-gL-kyl" secondAttribute="centerX" constant="-2.5" id="2Gr-hq-nSj"/>
|
||||
<constraint firstItem="hce-gL-kyl" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="U7H-qE-1Eb" secondAttribute="leading" constant="20" id="J3i-VD-vWd"/>
|
||||
<constraint firstItem="hce-gL-kyl" firstAttribute="leading" secondItem="U7H-qE-1Eb" secondAttribute="leading" constant="20" id="csz-HT-u0D"/>
|
||||
<constraint firstAttribute="trailing" secondItem="hce-gL-kyl" secondAttribute="trailing" constant="15" id="lA4-cN-FV2"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
</sections>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<prototypes>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="defaultProgress" id="gZ9-C2-XdN">
|
||||
<rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="gZ9-C2-XdN" id="fhg-U3-KZB">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<progressView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" progress="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="eIy-Ue-ZBA">
|
||||
<rect key="frame" x="20" y="20" width="335" height="4"/>
|
||||
</progressView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="eIy-Ue-ZBA" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="fhg-U3-KZB" secondAttribute="leading" constant="20" id="Ith-L4-qfp"/>
|
||||
<constraint firstAttribute="centerY" secondItem="eIy-Ue-ZBA" secondAttribute="centerY" id="bLG-zR-ePh"/>
|
||||
<constraint firstAttribute="trailing" secondItem="eIy-Ue-ZBA" secondAttribute="trailing" constant="20" symbolic="YES" id="cL7-M5-TNk"/>
|
||||
<constraint firstItem="eIy-Ue-ZBA" firstAttribute="leading" secondItem="fhg-U3-KZB" secondAttribute="leading" constant="20" symbolic="YES" id="o18-yA-e9B"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="tintedProgress" id="WZI-Lb-kJo">
|
||||
<rect key="frame" x="0.0" y="99.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="WZI-Lb-kJo" id="JBn-at-HLV">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<progressView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" progress="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="UFT-Mw-MF0">
|
||||
<rect key="frame" x="20" y="20" width="335" height="4"/>
|
||||
</progressView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="UFT-Mw-MF0" secondAttribute="centerY" id="84a-pU-Eji"/>
|
||||
<constraint firstItem="UFT-Mw-MF0" firstAttribute="leading" secondItem="JBn-at-HLV" secondAttribute="leading" constant="20" symbolic="YES" id="b9I-EP-hey"/>
|
||||
<constraint firstAttribute="trailing" secondItem="UFT-Mw-MF0" secondAttribute="trailing" constant="20" symbolic="YES" id="tsd-kx-Egt"/>
|
||||
<constraint firstItem="UFT-Mw-MF0" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="JBn-at-HLV" secondAttribute="leading" constant="20" id="tt1-l0-uol"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="barProgress" id="TXY-8P-Jnj">
|
||||
<rect key="frame" x="0.0" y="143.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="TXY-8P-Jnj" id="9B5-NG-dki">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<progressView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" progress="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="Aka-xI-d0T">
|
||||
<rect key="frame" x="20" y="20" width="335" height="4"/>
|
||||
</progressView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="Aka-xI-d0T" secondAttribute="trailing" constant="20" symbolic="YES" id="Avw-uQ-Z4Z"/>
|
||||
<constraint firstAttribute="centerY" secondItem="Aka-xI-d0T" secondAttribute="centerY" id="ETS-ik-ury"/>
|
||||
<constraint firstItem="Aka-xI-d0T" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="9B5-NG-dki" secondAttribute="leading" constant="20" id="Zgu-pu-dJo"/>
|
||||
<constraint firstItem="Aka-xI-d0T" firstAttribute="leading" secondItem="9B5-NG-dki" secondAttribute="leading" constant="20" symbolic="YES" id="hBM-gp-9o5"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</prototypes>
|
||||
<sections/>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="aY0-FD-8DD" id="fzw-Hl-Whn"/>
|
||||
<outlet property="delegate" destination="aY0-FD-8DD" id="1bx-jV-2bJ"/>
|
||||
|
|
@ -94,18 +83,15 @@
|
|||
</tableView>
|
||||
<navigationItem key="navigationItem" title="Progress Views" id="msy-b9-rro"/>
|
||||
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
|
||||
<connections>
|
||||
<outlet property="barStyleProgressView" destination="zOW-ND-gMa" id="oBr-1m-HjU"/>
|
||||
<outlet property="defaultStyleProgressView" destination="ei4-Kf-1yF" id="7lo-ee-pgZ"/>
|
||||
<outlet property="tintedProgressView" destination="hce-gL-kyl" id="6l7-NC-hb8"/>
|
||||
<outletCollection property="progressViews" destination="ei4-Kf-1yF" collectionClass="NSMutableArray" id="vi4-76-kJ6"/>
|
||||
<outletCollection property="progressViews" destination="hce-gL-kyl" collectionClass="NSMutableArray" id="kR6-BL-IOR"/>
|
||||
<outletCollection property="progressViews" destination="zOW-ND-gMa" collectionClass="NSMutableArray" id="gh3-jC-y2q"/>
|
||||
</connections>
|
||||
</tableViewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="Xdv-yA-Pae" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="2227" y="3368"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17132" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Eil-ie-nN6">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19142.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Eil-ie-nN6">
|
||||
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17105"/>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19129"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
|
|
@ -10,157 +12,134 @@
|
|||
<scene sceneID="0RQ-gw-hMl">
|
||||
<objects>
|
||||
<tableViewController id="Eil-ie-nN6" customClass="SegmentedControlViewController" customModule="UIKitCatalog" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" id="fLQ-5f-tUh">
|
||||
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="none" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" id="fLQ-5f-tUh">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
|
||||
<sections>
|
||||
<tableViewSection headerTitle="Default" id="HCa-pZ-1xG">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" rowHeight="90" id="8Eu-YT-DXB">
|
||||
<rect key="frame" x="0.0" y="55.5" width="375" height="90"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="8Eu-YT-DXB" id="M3h-lr-LNM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="90"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" translatesAutoresizingMaskIntoConstraints="NO" id="D6r-9d-m6L">
|
||||
<rect key="frame" x="47.5" y="29.5" width="280" height="32"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="280" id="CNa-r6-Q9z"/>
|
||||
</constraints>
|
||||
<segments>
|
||||
<segment title="Check"/>
|
||||
<segment title="Search"/>
|
||||
<segment title="Tools"/>
|
||||
</segments>
|
||||
</segmentedControl>
|
||||
</subviews>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<prototypes>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="segmentDefault" rowHeight="44" id="ua8-m3-vHa">
|
||||
<rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ua8-m3-vHa" id="8hH-e2-azy">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" translatesAutoresizingMaskIntoConstraints="NO" id="ZfH-o2-nhO">
|
||||
<rect key="frame" x="47.5" y="6.5" width="280" height="32"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="D6r-9d-m6L" secondAttribute="centerY" id="F5L-Sh-NBp"/>
|
||||
<constraint firstAttribute="centerX" secondItem="D6r-9d-m6L" secondAttribute="centerX" id="jd1-hl-wfu"/>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="280" id="6eM-gf-9p1"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
<tableViewSection headerTitle="Tinted" id="ylt-Fk-XEE">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" rowHeight="90" id="3qp-zK-6mx">
|
||||
<rect key="frame" x="0.0" y="193.5" width="375" height="90"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="3qp-zK-6mx" id="us5-tQ-6Iq">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="90"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" translatesAutoresizingMaskIntoConstraints="NO" id="A3j-iT-hVF">
|
||||
<rect key="frame" x="47.5" y="29.5" width="280" height="32"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="280" id="dyr-wx-mz3"/>
|
||||
</constraints>
|
||||
<segments>
|
||||
<segment title="Check"/>
|
||||
<segment title="Search"/>
|
||||
<segment title="Tools"/>
|
||||
</segments>
|
||||
</segmentedControl>
|
||||
</subviews>
|
||||
<segments>
|
||||
<segment title="Check"/>
|
||||
<segment title="Search"/>
|
||||
<segment title="Tools"/>
|
||||
</segments>
|
||||
</segmentedControl>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerX" secondItem="ZfH-o2-nhO" secondAttribute="centerX" id="K8k-EN-ood"/>
|
||||
<constraint firstAttribute="centerY" secondItem="ZfH-o2-nhO" secondAttribute="centerY" id="QNh-1O-Ngx"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="segmentTinted" rowHeight="44" id="L13-wH-2Nw">
|
||||
<rect key="frame" x="0.0" y="99.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="L13-wH-2Nw" id="y5b-ZB-fSO">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" translatesAutoresizingMaskIntoConstraints="NO" id="xZu-NZ-cjd">
|
||||
<rect key="frame" x="47.5" y="6.5" width="280" height="32"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerX" secondItem="A3j-iT-hVF" secondAttribute="centerX" id="cFX-g4-9b4"/>
|
||||
<constraint firstAttribute="centerY" secondItem="A3j-iT-hVF" secondAttribute="centerY" id="cQt-wG-S25"/>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="280" id="n63-l5-FqI"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
<tableViewSection headerTitle="Custom Segments" id="LBr-nb-ZpU">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" rowHeight="90" id="p73-fd-Xoq">
|
||||
<rect key="frame" x="0.0" y="331.5" width="375" height="90"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="p73-fd-Xoq" id="u8q-LS-Y7d">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="90"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" translatesAutoresizingMaskIntoConstraints="NO" id="dj6-Ch-8fj">
|
||||
<rect key="frame" x="47.5" y="29.5" width="280" height="32"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="280" id="8Kf-xD-h9j"/>
|
||||
</constraints>
|
||||
<segments>
|
||||
<segment title="Check"/>
|
||||
<segment title="Search"/>
|
||||
<segment title="Tools"/>
|
||||
</segments>
|
||||
</segmentedControl>
|
||||
</subviews>
|
||||
<segments>
|
||||
<segment title="Check"/>
|
||||
<segment title="Search"/>
|
||||
<segment title="Tools"/>
|
||||
</segments>
|
||||
</segmentedControl>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerX" secondItem="xZu-NZ-cjd" secondAttribute="centerX" id="qE9-z2-g59"/>
|
||||
<constraint firstAttribute="centerY" secondItem="xZu-NZ-cjd" secondAttribute="centerY" id="wnA-gu-UaY"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="segmentCustom" rowHeight="44" id="DRT-w6-Ine">
|
||||
<rect key="frame" x="0.0" y="143.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="DRT-w6-Ine" id="3h8-3a-85w">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" translatesAutoresizingMaskIntoConstraints="NO" id="mjY-Og-9lN">
|
||||
<rect key="frame" x="47.5" y="6.5" width="280" height="32"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="dj6-Ch-8fj" secondAttribute="centerY" id="bwP-Bm-Qqs"/>
|
||||
<constraint firstAttribute="centerX" secondItem="dj6-Ch-8fj" secondAttribute="centerX" id="mrF-qX-KeJ"/>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="280" id="9Dn-He-XOc"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
<tableViewSection headerTitle="Custom Background" id="Flv-0Z-gFn">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" rowHeight="90" id="hTb-Lv-lzA">
|
||||
<rect key="frame" x="0.0" y="469.5" width="375" height="90"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="hTb-Lv-lzA" id="HNU-4g-he5">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="90"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" translatesAutoresizingMaskIntoConstraints="NO" id="hvO-gV-AgD">
|
||||
<rect key="frame" x="47.5" y="29.5" width="280" height="32"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="280" id="UfD-W5-wci"/>
|
||||
</constraints>
|
||||
<segments>
|
||||
<segment title="Check"/>
|
||||
<segment title="Search"/>
|
||||
<segment title="Tools"/>
|
||||
</segments>
|
||||
</segmentedControl>
|
||||
</subviews>
|
||||
<segments>
|
||||
<segment title="Check"/>
|
||||
<segment title="Search"/>
|
||||
<segment title="Tools"/>
|
||||
</segments>
|
||||
</segmentedControl>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerX" secondItem="mjY-Og-9lN" secondAttribute="centerX" id="0dd-W2-Ji0"/>
|
||||
<constraint firstAttribute="centerY" secondItem="mjY-Og-9lN" secondAttribute="centerY" id="plu-4X-0jG"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="segmentCustomBackground" rowHeight="44" id="YdW-SD-1fw">
|
||||
<rect key="frame" x="0.0" y="187.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="YdW-SD-1fw" id="519-i4-oo7">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="I0A-3T-9iW">
|
||||
<rect key="frame" x="47.5" y="6" width="280" height="32"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerX" secondItem="hvO-gV-AgD" secondAttribute="centerX" id="II8-1E-IK9"/>
|
||||
<constraint firstAttribute="centerY" secondItem="hvO-gV-AgD" secondAttribute="centerY" id="uYn-sl-Vgy"/>
|
||||
<constraint firstAttribute="width" constant="280" id="PKS-2f-rd2"/>
|
||||
<constraint firstAttribute="height" constant="32" id="al3-Kn-h6a"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
<tableViewSection headerTitle="Action Based" id="Fzq-2p-q17" userLabel="Action Based">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" rowHeight="90" id="Qhn-Ee-iAM">
|
||||
<rect key="frame" x="0.0" y="607.5" width="375" height="90"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Qhn-Ee-iAM" id="xrQ-Qv-rX1">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="90"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" translatesAutoresizingMaskIntoConstraints="NO" id="eAh-Vg-WL1">
|
||||
<rect key="frame" x="47.5" y="29.5" width="280" height="32"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="280" id="xCf-yM-ojH"/>
|
||||
</constraints>
|
||||
<segments>
|
||||
<segment title="Check"/>
|
||||
<segment title="Search"/>
|
||||
<segment title="Tools"/>
|
||||
</segments>
|
||||
</segmentedControl>
|
||||
</subviews>
|
||||
</view>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="I0A-3T-9iW" firstAttribute="centerY" secondItem="519-i4-oo7" secondAttribute="centerY" id="Mvg-ei-MNT"/>
|
||||
<constraint firstItem="I0A-3T-9iW" firstAttribute="centerX" secondItem="519-i4-oo7" secondAttribute="centerX" id="pSh-c7-iFc"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="segmentAction" rowHeight="44" id="1C5-bq-H2S">
|
||||
<rect key="frame" x="0.0" y="231.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="1C5-bq-H2S" id="krO-6p-ntS">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" translatesAutoresizingMaskIntoConstraints="NO" id="z5O-ti-8hN">
|
||||
<rect key="frame" x="47.5" y="6.5" width="280" height="32"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="eAh-Vg-WL1" secondAttribute="centerY" id="ltZ-wg-zzb"/>
|
||||
<constraint firstAttribute="centerX" secondItem="eAh-Vg-WL1" secondAttribute="centerX" id="zms-vM-SuU"/>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="280" id="qW9-Oi-u5j"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
</sections>
|
||||
<segments>
|
||||
<segment title="Check"/>
|
||||
<segment title="Search"/>
|
||||
<segment title="Tools"/>
|
||||
</segments>
|
||||
</segmentedControl>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerX" secondItem="z5O-ti-8hN" secondAttribute="centerX" id="3mQ-ZK-WaU"/>
|
||||
<constraint firstAttribute="centerY" secondItem="z5O-ti-8hN" secondAttribute="centerY" id="qvD-lM-SNb"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</prototypes>
|
||||
<sections/>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="Eil-ie-nN6" id="WXj-aR-Xkb"/>
|
||||
<outlet property="delegate" destination="Eil-ie-nN6" id="SfZ-zb-fim"/>
|
||||
|
|
@ -168,22 +147,15 @@
|
|||
</tableView>
|
||||
<navigationItem key="navigationItem" title="Segmented Controls" id="LSm-7X-Qet"/>
|
||||
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
|
||||
<connections>
|
||||
<outlet property="actionBasedSegmentedControl" destination="eAh-Vg-WL1" id="3si-ha-nhl"/>
|
||||
<outlet property="customBackgroundSegmentedControl" destination="hvO-gV-AgD" id="1sh-L5-n7s"/>
|
||||
<outlet property="customSegmentsSegmentedControl" destination="dj6-Ch-8fj" id="GcL-9F-uX5"/>
|
||||
<outlet property="defaultSegmentedControl" destination="D6r-9d-m6L" id="cpp-0k-vqT"/>
|
||||
<outlet property="tintedSegmentedControl" destination="A3j-iT-hVF" id="Iky-aQ-Wek"/>
|
||||
</connections>
|
||||
</tableViewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="cdC-yR-iYh" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="3278" y="3368"/>
|
||||
<point key="canvasLocation" x="3277.5999999999999" y="3367.4662668665669"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<systemColor name="groupTableViewBackgroundColor">
|
||||
<color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14810.11" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="laz-6N-ZhE">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19142.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="laz-6N-ZhE">
|
||||
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14766.13"/>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19129"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
|
|
@ -10,104 +12,89 @@
|
|||
<scene sceneID="AcL-XD-MBK">
|
||||
<objects>
|
||||
<tableViewController id="laz-6N-ZhE" customClass="SliderViewController" customModule="UIKitCatalog" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" id="8xG-xW-Mvc">
|
||||
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="none" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" id="8xG-xW-Mvc">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
|
||||
<sections>
|
||||
<tableViewSection headerTitle="Default" id="GM5-I7-cLR">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="3ns-I6-0FN">
|
||||
<rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="3ns-I6-0FN" id="1JS-69-7PP">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="0.5" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="r7t-o7-uUH">
|
||||
<rect key="frame" x="18" y="7.5" width="339" height="31"/>
|
||||
</slider>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="r7t-o7-uUH" secondAttribute="trailing" constant="20" symbolic="YES" id="5xm-6E-4qS"/>
|
||||
<constraint firstItem="r7t-o7-uUH" firstAttribute="leading" secondItem="1JS-69-7PP" secondAttribute="leading" constant="20" symbolic="YES" id="NmN-hs-RWT"/>
|
||||
<constraint firstAttribute="centerY" secondItem="r7t-o7-uUH" secondAttribute="centerY" constant="-0.5" id="R3V-br-G65"/>
|
||||
<constraint firstAttribute="centerX" secondItem="r7t-o7-uUH" secondAttribute="centerX" id="yqs-XK-usC"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
<tableViewSection headerTitle="Tinted" id="qhz-Ob-BuS">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="XBb-zZ-6xb">
|
||||
<rect key="frame" x="0.0" y="147.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="XBb-zZ-6xb" id="9s3-6s-kVp">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="0.5" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="CGL-pk-k1S">
|
||||
<rect key="frame" x="18" y="7.5" width="339" height="31"/>
|
||||
</slider>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="CGL-pk-k1S" firstAttribute="leading" secondItem="9s3-6s-kVp" secondAttribute="leading" constant="20" symbolic="YES" id="4Sf-rO-Ows"/>
|
||||
<constraint firstAttribute="trailing" secondItem="CGL-pk-k1S" secondAttribute="trailing" constant="20" symbolic="YES" id="Fny-EL-oV9"/>
|
||||
<constraint firstAttribute="centerY" secondItem="CGL-pk-k1S" secondAttribute="centerY" constant="-0.5" id="GdE-Cc-rqX"/>
|
||||
<constraint firstAttribute="centerX" secondItem="CGL-pk-k1S" secondAttribute="centerX" id="IDq-gh-x3U"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
<tableViewSection headerTitle="Custom" id="61k-iV-riT">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="4OB-jL-pxb">
|
||||
<rect key="frame" x="0.0" y="239.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="4OB-jL-pxb" id="2gM-p3-Tof">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="0.5" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="fUs-ee-MUt">
|
||||
<rect key="frame" x="18" y="7.5" width="339" height="31"/>
|
||||
</slider>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerX" secondItem="fUs-ee-MUt" secondAttribute="centerX" id="8x6-Jh-hRJ"/>
|
||||
<constraint firstAttribute="centerY" secondItem="fUs-ee-MUt" secondAttribute="centerY" constant="-0.5" id="AWY-BZ-4kq"/>
|
||||
<constraint firstItem="fUs-ee-MUt" firstAttribute="leading" secondItem="2gM-p3-Tof" secondAttribute="leading" constant="20" symbolic="YES" id="KkC-zZ-qqD"/>
|
||||
<constraint firstAttribute="trailing" secondItem="fUs-ee-MUt" secondAttribute="trailing" constant="20" symbolic="YES" id="vOg-DS-jcR"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
<tableViewSection headerTitle="Min and Max Images" id="7KF-l2-cgG">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="IaF-oq-cUi">
|
||||
<rect key="frame" x="0.0" y="331.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="IaF-oq-cUi" id="pZM-D2-qX5">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="0.5" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="IZf-0b-G8r">
|
||||
<rect key="frame" x="18" y="7.5" width="339" height="31"/>
|
||||
</slider>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="IZf-0b-G8r" firstAttribute="leading" secondItem="pZM-D2-qX5" secondAttribute="leading" constant="20" symbolic="YES" id="SI4-TD-KwJ"/>
|
||||
<constraint firstAttribute="trailing" secondItem="IZf-0b-G8r" secondAttribute="trailing" constant="20" symbolic="YES" id="Zwp-BQ-N1k"/>
|
||||
<constraint firstAttribute="centerX" secondItem="IZf-0b-G8r" secondAttribute="centerX" id="k1b-Im-KuU"/>
|
||||
<constraint firstAttribute="centerY" secondItem="IZf-0b-G8r" secondAttribute="centerY" constant="-0.5" id="peG-9p-9Ls"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
</sections>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<prototypes>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="sliderDefault" id="4zC-vI-0NC">
|
||||
<rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="4zC-vI-0NC" id="VfF-ru-LCc">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="0.5" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="lhN-5T-HKR">
|
||||
<rect key="frame" x="18" y="7.5" width="339" height="31"/>
|
||||
</slider>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="lhN-5T-HKR" secondAttribute="centerY" constant="-0.5" id="Ez3-DH-Gk6"/>
|
||||
<constraint firstAttribute="centerX" secondItem="lhN-5T-HKR" secondAttribute="centerX" id="I1F-g6-cdT"/>
|
||||
<constraint firstItem="lhN-5T-HKR" firstAttribute="leading" secondItem="VfF-ru-LCc" secondAttribute="leading" constant="20" symbolic="YES" id="QnE-iU-5Qj"/>
|
||||
<constraint firstAttribute="trailing" secondItem="lhN-5T-HKR" secondAttribute="trailing" constant="20" symbolic="YES" id="eOh-IC-63m"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="sliderTinted" id="XKm-vp-Z4e">
|
||||
<rect key="frame" x="0.0" y="99.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="XKm-vp-Z4e" id="gcy-A0-hCb">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="0.5" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="y6j-bZ-afc">
|
||||
<rect key="frame" x="18" y="7.5" width="339" height="31"/>
|
||||
</slider>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="y6j-bZ-afc" firstAttribute="leading" secondItem="gcy-A0-hCb" secondAttribute="leading" constant="20" symbolic="YES" id="EKx-YK-Wfi"/>
|
||||
<constraint firstAttribute="centerX" secondItem="y6j-bZ-afc" secondAttribute="centerX" id="YBj-dW-I4S"/>
|
||||
<constraint firstAttribute="trailing" secondItem="y6j-bZ-afc" secondAttribute="trailing" constant="20" symbolic="YES" id="iyB-ii-Udq"/>
|
||||
<constraint firstAttribute="centerY" secondItem="y6j-bZ-afc" secondAttribute="centerY" constant="-0.5" id="vGL-LN-ENO"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="sliderCustom" id="p07-nL-MO3">
|
||||
<rect key="frame" x="0.0" y="143.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="p07-nL-MO3" id="aH9-0B-8vB">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="0.5" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="SmN-ak-G2E">
|
||||
<rect key="frame" x="18" y="7.5" width="339" height="31"/>
|
||||
</slider>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="SmN-ak-G2E" firstAttribute="leading" secondItem="aH9-0B-8vB" secondAttribute="leading" constant="20" symbolic="YES" id="95t-uw-zP7"/>
|
||||
<constraint firstAttribute="trailing" secondItem="SmN-ak-G2E" secondAttribute="trailing" constant="20" symbolic="YES" id="MoB-jI-3Gh"/>
|
||||
<constraint firstAttribute="centerX" secondItem="SmN-ak-G2E" secondAttribute="centerX" id="XHr-Na-NXh"/>
|
||||
<constraint firstAttribute="centerY" secondItem="SmN-ak-G2E" secondAttribute="centerY" constant="-0.5" id="hgn-jI-PGt"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="sliderMaxMinImage" id="47D-pV-Eeq">
|
||||
<rect key="frame" x="0.0" y="187.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="47D-pV-Eeq" id="xpQ-Bb-Ent">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="0.5" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="MiC-8a-nwg">
|
||||
<rect key="frame" x="18" y="7.5" width="339" height="31"/>
|
||||
</slider>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerX" secondItem="MiC-8a-nwg" secondAttribute="centerX" id="9Qo-ZL-aKD"/>
|
||||
<constraint firstItem="MiC-8a-nwg" firstAttribute="leading" secondItem="xpQ-Bb-Ent" secondAttribute="leading" constant="20" symbolic="YES" id="E6F-Xk-RK4"/>
|
||||
<constraint firstAttribute="centerY" secondItem="MiC-8a-nwg" secondAttribute="centerY" constant="-0.5" id="ntR-r4-03e"/>
|
||||
<constraint firstAttribute="trailing" secondItem="MiC-8a-nwg" secondAttribute="trailing" constant="20" symbolic="YES" id="rOg-5K-S3g"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</prototypes>
|
||||
<sections/>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="laz-6N-ZhE" id="J0B-Vs-5pv"/>
|
||||
<outlet property="delegate" destination="laz-6N-ZhE" id="IsZ-mN-lte"/>
|
||||
|
|
@ -115,16 +102,15 @@
|
|||
</tableView>
|
||||
<navigationItem key="navigationItem" title="Sliders" id="Lp8-FI-W8w"/>
|
||||
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
|
||||
<connections>
|
||||
<outlet property="customSlider" destination="fUs-ee-MUt" id="aKh-90-kmA"/>
|
||||
<outlet property="defaultSlider" destination="r7t-o7-uUH" id="BWI-BT-mpD"/>
|
||||
<outlet property="minMaxImageSlider" destination="IZf-0b-G8r" id="he9-y7-sZ0"/>
|
||||
<outlet property="tintedSlider" destination="CGL-pk-k1S" id="3OT-8C-M2N"/>
|
||||
</connections>
|
||||
</tableViewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="vWL-oj-RdA" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="4225" y="3368"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14800.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Ob2-pp-aCj">
|
||||
<device id="retina4_7" orientation="portrait"/>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19142.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Ob2-pp-aCj">
|
||||
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14758.1"/>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19142.2"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
|
|
@ -10,102 +12,79 @@
|
|||
<scene sceneID="xBH-7V-3ks">
|
||||
<objects>
|
||||
<tableViewController id="Ob2-pp-aCj" customClass="StepperViewController" customModule="UIKitCatalog" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" id="aQ3-9F-Tmi">
|
||||
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="none" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" id="aQ3-9F-Tmi">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
|
||||
<sections>
|
||||
<tableViewSection headerTitle="Default" id="oCN-zS-UpR">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="MFv-3k-2QS">
|
||||
<rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="MFv-3k-2QS" id="muw-kh-U1w">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<stepper opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" maximumValue="10" translatesAutoresizingMaskIntoConstraints="NO" id="LyL-x2-2Vc">
|
||||
<rect key="frame" x="140.5" y="8" width="94" height="28"/>
|
||||
</stepper>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="o6t-lj-Q9C">
|
||||
<rect key="frame" x="258" y="11" width="97" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerX" secondItem="o6t-lj-Q9C" secondAttribute="centerX" constant="-119" id="QhV-qd-xEq"/>
|
||||
<constraint firstAttribute="centerX" secondItem="LyL-x2-2Vc" secondAttribute="centerX" id="VAc-35-bll"/>
|
||||
<constraint firstAttribute="centerY" secondItem="LyL-x2-2Vc" secondAttribute="centerY" id="ZHH-kz-KM2"/>
|
||||
<constraint firstItem="o6t-lj-Q9C" firstAttribute="centerY" secondItem="LyL-x2-2Vc" secondAttribute="centerY" constant="-1" id="lSF-EQ-HKT"/>
|
||||
<constraint firstAttribute="trailing" secondItem="o6t-lj-Q9C" secondAttribute="trailing" constant="20" id="w6F-cj-8Pt"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
<tableViewSection headerTitle="Tinted" id="yPy-xd-oxi">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="Zsy-ff-fyO">
|
||||
<rect key="frame" x="0.0" y="147.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Zsy-ff-fyO" id="BCh-iQ-hHA">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<stepper opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" maximumValue="10" translatesAutoresizingMaskIntoConstraints="NO" id="bdI-D2-Wgr">
|
||||
<rect key="frame" x="140.5" y="8" width="94" height="28"/>
|
||||
</stepper>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Pgb-CR-d8e">
|
||||
<rect key="frame" x="258" y="11" width="97" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerX" secondItem="bdI-D2-Wgr" secondAttribute="centerX" id="DUv-r4-TzY"/>
|
||||
<constraint firstAttribute="centerX" secondItem="Pgb-CR-d8e" secondAttribute="centerX" constant="-119" id="T4v-0F-qDJ"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Pgb-CR-d8e" secondAttribute="trailing" constant="20" id="XdG-uJ-9Pj"/>
|
||||
<constraint firstItem="Pgb-CR-d8e" firstAttribute="centerY" secondItem="bdI-D2-Wgr" secondAttribute="centerY" constant="-1" id="dYM-Dd-lDV"/>
|
||||
<constraint firstAttribute="centerY" secondItem="bdI-D2-Wgr" secondAttribute="centerY" id="z6P-Oz-SjP"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
<tableViewSection headerTitle="Custom" id="v11-6g-9XU">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="G5u-Bn-eCH">
|
||||
<rect key="frame" x="0.0" y="239.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="G5u-Bn-eCH" id="mOU-DX-EXS">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<stepper opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" maximumValue="10" translatesAutoresizingMaskIntoConstraints="NO" id="Adb-NR-4zI">
|
||||
<rect key="frame" x="140.5" y="8" width="94" height="28"/>
|
||||
</stepper>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qU1-em-e89">
|
||||
<rect key="frame" x="258" y="11" width="97" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="qU1-em-e89" firstAttribute="centerY" secondItem="Adb-NR-4zI" secondAttribute="centerY" constant="-1" id="27a-pw-Fpq"/>
|
||||
<constraint firstAttribute="centerY" secondItem="Adb-NR-4zI" secondAttribute="centerY" id="9hz-A5-Oeh"/>
|
||||
<constraint firstAttribute="centerX" secondItem="Adb-NR-4zI" secondAttribute="centerX" id="GFy-2t-Isp"/>
|
||||
<constraint firstAttribute="centerX" secondItem="qU1-em-e89" secondAttribute="centerX" constant="-119" id="Uqv-Mu-8Ea"/>
|
||||
<constraint firstAttribute="trailing" secondItem="qU1-em-e89" secondAttribute="trailing" constant="20" id="xDv-ev-FUu"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
</sections>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<prototypes>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="defaultStepper" id="txD-Kd-WKO">
|
||||
<rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="txD-Kd-WKO" id="9Ly-79-FgI">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<stepper opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" maximumValue="10" translatesAutoresizingMaskIntoConstraints="NO" id="Rwt-E0-Les">
|
||||
<rect key="frame" x="140.5" y="6" width="94" height="32"/>
|
||||
</stepper>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="Rwt-E0-Les" firstAttribute="centerX" secondItem="9Ly-79-FgI" secondAttribute="centerX" id="Djd-St-gHh"/>
|
||||
<constraint firstItem="Rwt-E0-Les" firstAttribute="centerY" secondItem="9Ly-79-FgI" secondAttribute="centerY" id="dUb-YS-6Nn"/>
|
||||
</constraints>
|
||||
<variation key="heightClass=regular-userInterfaceIdiom=mac-widthClass=compact">
|
||||
<mask key="subviews">
|
||||
<exclude reference="Rwt-E0-Les"/>
|
||||
</mask>
|
||||
</variation>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="tintedStepper" id="6oV-1N-Grs">
|
||||
<rect key="frame" x="0.0" y="99.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="6oV-1N-Grs" id="vMM-mh-15P">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<stepper opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" maximumValue="10" translatesAutoresizingMaskIntoConstraints="NO" id="m2X-w6-RUU">
|
||||
<rect key="frame" x="140.5" y="6" width="94" height="32"/>
|
||||
</stepper>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="m2X-w6-RUU" firstAttribute="centerX" secondItem="vMM-mh-15P" secondAttribute="centerX" id="M8s-QM-GS7"/>
|
||||
<constraint firstItem="m2X-w6-RUU" firstAttribute="centerY" secondItem="vMM-mh-15P" secondAttribute="centerY" id="e8j-CB-x6c"/>
|
||||
</constraints>
|
||||
<variation key="heightClass=regular-userInterfaceIdiom=mac-widthClass=compact">
|
||||
<mask key="subviews">
|
||||
<exclude reference="m2X-w6-RUU"/>
|
||||
</mask>
|
||||
</variation>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="customStepper" id="6QE-YR-v8B">
|
||||
<rect key="frame" x="0.0" y="143.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="6QE-YR-v8B" id="20r-KY-uNw">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<stepper opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" maximumValue="10" translatesAutoresizingMaskIntoConstraints="NO" id="xNt-Bk-wo8">
|
||||
<rect key="frame" x="140.5" y="6" width="94" height="32"/>
|
||||
</stepper>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="xNt-Bk-wo8" firstAttribute="centerX" secondItem="20r-KY-uNw" secondAttribute="centerX" id="pTg-IT-vAf"/>
|
||||
<constraint firstItem="xNt-Bk-wo8" firstAttribute="centerY" secondItem="20r-KY-uNw" secondAttribute="centerY" id="zBQ-l9-vjB"/>
|
||||
</constraints>
|
||||
<variation key="heightClass=regular-userInterfaceIdiom=mac-widthClass=compact">
|
||||
<mask key="subviews">
|
||||
<exclude reference="xNt-Bk-wo8"/>
|
||||
</mask>
|
||||
</variation>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</prototypes>
|
||||
<sections/>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="Ob2-pp-aCj" id="VqG-Vh-qI4"/>
|
||||
<outlet property="delegate" destination="Ob2-pp-aCj" id="DfP-FZ-0PN"/>
|
||||
|
|
@ -113,18 +92,15 @@
|
|||
</tableView>
|
||||
<navigationItem key="navigationItem" title="Steppers" id="T8O-Ms-7gi"/>
|
||||
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
|
||||
<connections>
|
||||
<outlet property="customStepper" destination="Adb-NR-4zI" id="qMi-we-RaN"/>
|
||||
<outlet property="customStepperLabel" destination="qU1-em-e89" id="Amb-dh-MZW"/>
|
||||
<outlet property="defaultStepper" destination="LyL-x2-2Vc" id="A3V-Ae-qLa"/>
|
||||
<outlet property="defaultStepperLabel" destination="o6t-lj-Q9C" id="otm-OH-9e4"/>
|
||||
<outlet property="tintedStepper" destination="bdI-D2-Wgr" id="YTt-vZ-uGz"/>
|
||||
<outlet property="tintedStepperLabel" destination="Pgb-CR-d8e" id="CTl-hM-tLv"/>
|
||||
</connections>
|
||||
</tableViewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="zYk-TL-2Rd" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="5177" y="3368"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="zcI-oN-J3j">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19142.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="zcI-oN-J3j">
|
||||
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17502"/>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19142.2"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
|
|
@ -10,75 +12,64 @@
|
|||
<scene sceneID="yZh-jH-dTD">
|
||||
<objects>
|
||||
<tableViewController id="zcI-oN-J3j" customClass="SwitchViewController" customModule="UIKitCatalog" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" id="4ER-nG-feZ">
|
||||
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="none" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" id="4ER-nG-feZ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
|
||||
<sections>
|
||||
<tableViewSection headerTitle="Default" id="A1X-FU-XOh">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="kaW-Np-hDH">
|
||||
<rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="kaW-Np-hDH" id="q8w-Lw-NG5">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="juD-bH-XxM">
|
||||
<rect key="frame" x="163.5" y="6.5" width="51" height="31"/>
|
||||
</switch>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerX" secondItem="juD-bH-XxM" secondAttribute="centerX" constant="-0.5" id="VUp-yh-G33"/>
|
||||
<constraint firstAttribute="centerY" secondItem="juD-bH-XxM" secondAttribute="centerY" id="w2H-h5-KEL"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
<tableViewSection headerTitle="Checkbox" id="8tR-h3-BYV" userLabel="Checkbox">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="OTP-c3-orK">
|
||||
<rect key="frame" x="0.0" y="147.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="OTP-c3-orK" id="vdP-Xc-eFr">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="vfi-lH-jjc">
|
||||
<rect key="frame" x="163.5" y="6.5" width="51" height="31"/>
|
||||
</switch>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="vfi-lH-jjc" secondAttribute="centerY" id="6Nc-5B-mw0"/>
|
||||
<constraint firstAttribute="centerX" secondItem="vfi-lH-jjc" secondAttribute="centerX" constant="-0.5" id="Myr-tg-Jpi"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
<tableViewSection headerTitle="Tinted" id="CBk-hR-hJd">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="yon-1U-p9a">
|
||||
<rect key="frame" x="0.0" y="239.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="yon-1U-p9a" id="wAh-qG-cWE">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="w5d-qp-nmC">
|
||||
<rect key="frame" x="163.5" y="6.5" width="51" height="31"/>
|
||||
</switch>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerX" secondItem="w5d-qp-nmC" secondAttribute="centerX" constant="-0.5" id="adx-9y-wdr"/>
|
||||
<constraint firstAttribute="centerY" secondItem="w5d-qp-nmC" secondAttribute="centerY" id="iOC-j0-dgx"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
</sections>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<prototypes>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="defaultSwitch" id="f2V-rX-9gQ">
|
||||
<rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="f2V-rX-9gQ" id="l7D-vo-3Fg">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="oo0-hx-cfB">
|
||||
<rect key="frame" x="163.5" y="6.5" width="51" height="31"/>
|
||||
</switch>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="oo0-hx-cfB" secondAttribute="centerY" id="CPt-vs-doH"/>
|
||||
<constraint firstAttribute="centerX" secondItem="oo0-hx-cfB" secondAttribute="centerX" constant="-0.5" id="lMy-9T-OsY"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="checkBoxSwitch" id="ZtK-qD-aK7">
|
||||
<rect key="frame" x="0.0" y="99.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ZtK-qD-aK7" id="ftX-7w-r3T">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="nGn-0f-X18">
|
||||
<rect key="frame" x="163.5" y="6.5" width="51" height="31"/>
|
||||
</switch>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="nGn-0f-X18" secondAttribute="centerY" id="r0z-Bb-coX"/>
|
||||
<constraint firstAttribute="centerX" secondItem="nGn-0f-X18" secondAttribute="centerX" constant="-0.5" id="zqt-MS-Iwh"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="tintedSwitch" id="N1l-BI-0av">
|
||||
<rect key="frame" x="0.0" y="143.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="N1l-BI-0av" id="Baf-ca-NGq">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="xbi-bh-Kv0">
|
||||
<rect key="frame" x="163.5" y="6.5" width="51" height="31"/>
|
||||
</switch>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="xbi-bh-Kv0" secondAttribute="centerY" id="12i-3X-9m6"/>
|
||||
<constraint firstAttribute="centerX" secondItem="xbi-bh-Kv0" secondAttribute="centerX" constant="-0.5" id="5W1-M2-T2f"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</prototypes>
|
||||
<sections/>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="zcI-oN-J3j" id="bGx-5d-egx"/>
|
||||
<outlet property="delegate" destination="zcI-oN-J3j" id="GLB-HP-UiY"/>
|
||||
|
|
@ -86,11 +77,6 @@
|
|||
</tableView>
|
||||
<navigationItem key="navigationItem" title="Switches" id="E77-79-RWj"/>
|
||||
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
|
||||
<connections>
|
||||
<outlet property="checkBoxSwitch" destination="vfi-lH-jjc" id="QYU-aB-c9V"/>
|
||||
<outlet property="defaultSwitch" destination="juD-bH-XxM" id="U7B-Ar-wQR"/>
|
||||
<outlet property="tintedSwitch" destination="w5d-qp-nmC" id="8p2-vj-WvA"/>
|
||||
</connections>
|
||||
</tableViewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="mEp-eH-gRH" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
|
|
@ -98,8 +84,8 @@
|
|||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<systemColor name="groupTableViewBackgroundColor">
|
||||
<color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
|
|||
166
UIKitCatalog/Base.lproj/SymbolViewController.storyboard
Executable file
|
|
@ -0,0 +1,166 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19158" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Ob2-pp-aCj">
|
||||
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19158"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--SF Symbols-->
|
||||
<scene sceneID="xBH-7V-3ks">
|
||||
<objects>
|
||||
<tableViewController id="Ob2-pp-aCj" customClass="SymbolViewController" customModule="UIKitCatalog" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="none" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="aQ3-9F-Tmi">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<prototypes>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="tintedSymbol" id="pVy-wA-LGh">
|
||||
<rect key="frame" x="0.0" y="49.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="pVy-wA-LGh" id="Bra-pA-ifB">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Ycd-EG-6Qx">
|
||||
<rect key="frame" x="167.5" y="2" width="40" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="40" id="5Dk-Ul-mqL"/>
|
||||
<constraint firstAttribute="height" constant="40" id="xOg-9x-1fX"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="Ycd-EG-6Qx" firstAttribute="centerY" secondItem="Bra-pA-ifB" secondAttribute="centerY" id="D64-wD-E8M"/>
|
||||
<constraint firstItem="Ycd-EG-6Qx" firstAttribute="centerX" secondItem="Bra-pA-ifB" secondAttribute="centerX" id="L6C-0R-o16"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="preferringMultiColorSymbol" id="mn5-em-euI">
|
||||
<rect key="frame" x="0.0" y="93.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="mn5-em-euI" id="jfd-AB-91o">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="9BN-CJ-ydA">
|
||||
<rect key="frame" x="167.5" y="2" width="40" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="7Rc-ot-zfb"/>
|
||||
<constraint firstAttribute="width" constant="40" id="Y3r-DQ-mue"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="9BN-CJ-ydA" firstAttribute="centerX" secondItem="jfd-AB-91o" secondAttribute="centerX" id="XEw-ob-DxO"/>
|
||||
<constraint firstItem="9BN-CJ-ydA" firstAttribute="centerY" secondItem="jfd-AB-91o" secondAttribute="centerY" id="ZmR-w2-01z"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="largeSizeSymbol" rowHeight="87" id="b8L-NP-7ig">
|
||||
<rect key="frame" x="0.0" y="137.5" width="375" height="87"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="b8L-NP-7ig" id="jxN-AA-sF8">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="87"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="l7n-W1-B5F">
|
||||
<rect key="frame" x="146.5" y="0.0" width="82" height="87"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="87" id="1gl-G4-uFA"/>
|
||||
<constraint firstAttribute="width" constant="82" id="9Js-Pr-0VY"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="l7n-W1-B5F" firstAttribute="centerX" secondItem="jxN-AA-sF8" secondAttribute="centerX" id="K0e-mN-a6z"/>
|
||||
<constraint firstItem="l7n-W1-B5F" firstAttribute="centerY" secondItem="jxN-AA-sF8" secondAttribute="centerY" id="XFU-nr-Zsg"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="paletteColorsSymbol" id="Lc6-Yf-pbx">
|
||||
<rect key="frame" x="0.0" y="224.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Lc6-Yf-pbx" id="jHG-40-zKP">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="qfQ-PP-XIX">
|
||||
<rect key="frame" x="167.5" y="2" width="40" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="BD3-xX-g1U"/>
|
||||
<constraint firstAttribute="width" constant="40" id="bvT-GT-GE5"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="qfQ-PP-XIX" firstAttribute="centerY" secondItem="jHG-40-zKP" secondAttribute="centerY" id="Nsc-ga-mot"/>
|
||||
<constraint firstItem="qfQ-PP-XIX" firstAttribute="centerX" secondItem="jHG-40-zKP" secondAttribute="centerX" id="x1c-o2-9hg"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="plainSymbol" id="X5R-ZG-sGl">
|
||||
<rect key="frame" x="0.0" y="268.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="X5R-ZG-sGl" id="HYL-4M-XUi">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="oRB-W1-zx1">
|
||||
<rect key="frame" x="167.5" y="2" width="40" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="oBK-EI-1lY"/>
|
||||
<constraint firstAttribute="width" constant="40" id="zCT-dt-i5N"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="oRB-W1-zx1" firstAttribute="centerX" secondItem="HYL-4M-XUi" secondAttribute="centerX" id="VdQ-ME-0pr"/>
|
||||
<constraint firstItem="oRB-W1-zx1" firstAttribute="centerY" secondItem="HYL-4M-XUi" secondAttribute="centerY" id="nhd-Yl-GRn"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="hierarchicalColorSymbol" id="4Qm-cv-5Zj">
|
||||
<rect key="frame" x="0.0" y="312.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="4Qm-cv-5Zj" id="a2f-Kd-Lhe">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="syU-Qn-r3j">
|
||||
<rect key="frame" x="167.5" y="2" width="40" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="40" id="cvd-lE-fE7"/>
|
||||
<constraint firstAttribute="height" constant="40" id="n1h-7v-SdN"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="syU-Qn-r3j" firstAttribute="centerX" secondItem="a2f-Kd-Lhe" secondAttribute="centerX" id="9Fv-Xy-fgd"/>
|
||||
<constraint firstItem="syU-Qn-r3j" firstAttribute="centerY" secondItem="a2f-Kd-Lhe" secondAttribute="centerY" id="hdv-YK-jtt"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</prototypes>
|
||||
<sections/>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="Ob2-pp-aCj" id="VqG-Vh-qI4"/>
|
||||
<outlet property="delegate" destination="Ob2-pp-aCj" id="DfP-FZ-0PN"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
<navigationItem key="navigationItem" title="SF Symbols" id="T8O-Ms-7gi"/>
|
||||
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
|
||||
</tableViewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="zYk-TL-2Rd" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="5177" y="3368"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
@ -1,8 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14810.12" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="DSJ-7r-oCY">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19142.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="DSJ-7r-oCY">
|
||||
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14766.15"/>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19142.2"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
|
|
@ -10,180 +12,144 @@
|
|||
<scene sceneID="LZ1-eW-n5K">
|
||||
<objects>
|
||||
<tableViewController id="DSJ-7r-oCY" customClass="TextFieldViewController" customModule="UIKitCatalog" sceneMemberID="viewController">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" id="dyj-uS-k8j">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="none" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" id="dyj-uS-k8j">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
|
||||
<sections>
|
||||
<tableViewSection headerTitle="Default" id="2JS-A6-933">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="tt6-SE-2XG">
|
||||
<rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="tt6-SE-2XG" id="V1m-oL-rpG">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="d0M-ZQ-Bl5">
|
||||
<rect key="frame" x="77.5" y="5" width="220" height="34"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="220" id="SkU-sM-X8n"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits"/>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="DSJ-7r-oCY" id="ctm-bX-Oxa"/>
|
||||
</connections>
|
||||
</textField>
|
||||
</subviews>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<prototypes>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="searchTextField" id="ljc-Jw-BFg">
|
||||
<rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ljc-Jw-BFg" id="Flg-he-G6P">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="KMF-X8-0hG" customClass="UISearchTextField">
|
||||
<rect key="frame" x="16" y="5" width="343" height="34"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits"/>
|
||||
</textField>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="KMF-X8-0hG" firstAttribute="leading" secondItem="Flg-he-G6P" secondAttribute="leading" constant="16" id="3oU-Rj-dHI"/>
|
||||
<constraint firstAttribute="trailing" secondItem="KMF-X8-0hG" secondAttribute="trailing" constant="16" id="a5j-ld-ug7"/>
|
||||
<constraint firstItem="KMF-X8-0hG" firstAttribute="centerY" secondItem="Flg-he-G6P" secondAttribute="centerY" id="sN1-MK-Ksi"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="tintedTextField" id="Hzq-9N-XB0">
|
||||
<rect key="frame" x="0.0" y="99.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Hzq-9N-XB0" id="Qda-3b-61J">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="RaZ-lZ-jgw">
|
||||
<rect key="frame" x="77.5" y="5" width="220" height="34"/>
|
||||
<constraints>
|
||||
<constraint firstItem="d0M-ZQ-Bl5" firstAttribute="centerY" secondItem="V1m-oL-rpG" secondAttribute="centerY" id="t7K-C9-UtL"/>
|
||||
<constraint firstItem="d0M-ZQ-Bl5" firstAttribute="centerX" secondItem="V1m-oL-rpG" secondAttribute="centerX" id="u0Y-TA-d2a"/>
|
||||
<constraint firstAttribute="width" constant="220" id="8g0-cm-CCU"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
<tableViewSection headerTitle="Tinted" id="ugZ-rF-ygf">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="ByO-KF-g5d">
|
||||
<rect key="frame" x="0.0" y="147.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ByO-KF-g5d" id="3ka-jS-1aS">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="HOG-Yp-juH">
|
||||
<rect key="frame" x="77.5" y="5" width="220" height="34"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="220" id="LtQ-yh-RuD"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits"/>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="DSJ-7r-oCY" id="cAt-Pg-ihE"/>
|
||||
</connections>
|
||||
</textField>
|
||||
</subviews>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits"/>
|
||||
</textField>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="RaZ-lZ-jgw" firstAttribute="centerX" secondItem="Qda-3b-61J" secondAttribute="centerX" id="Chp-t2-uTm"/>
|
||||
<constraint firstItem="RaZ-lZ-jgw" firstAttribute="centerY" secondItem="Qda-3b-61J" secondAttribute="centerY" id="frJ-63-zGK"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="customTextField" id="aEK-MG-3mO">
|
||||
<rect key="frame" x="0.0" y="143.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="aEK-MG-3mO" id="rTF-Av-Gl6">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="6wP-A9-fuw" customClass="CustomTextField" customModule="UIKitCatalog" customModuleProvider="target">
|
||||
<rect key="frame" x="77.5" y="7" width="220" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstItem="HOG-Yp-juH" firstAttribute="centerX" secondItem="3ka-jS-1aS" secondAttribute="centerX" id="DRS-zK-WcP"/>
|
||||
<constraint firstItem="HOG-Yp-juH" firstAttribute="centerY" secondItem="3ka-jS-1aS" secondAttribute="centerY" id="RkA-1I-yPa"/>
|
||||
<constraint firstAttribute="height" constant="30" id="9u9-Ih-c3n"/>
|
||||
<constraint firstAttribute="width" constant="220" id="KcF-vn-pCo"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
<tableViewSection headerTitle="Secure" id="9AM-Ev-vhx">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="EAr-Is-gih">
|
||||
<rect key="frame" x="0.0" y="239.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="EAr-Is-gih" id="Pbu-Mo-uwJ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="6hY-Wr-WkQ">
|
||||
<rect key="frame" x="77.5" y="5" width="220" height="34"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="220" id="G3c-qp-XID"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits"/>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="DSJ-7r-oCY" id="Zmt-rK-fSU"/>
|
||||
</connections>
|
||||
</textField>
|
||||
</subviews>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits"/>
|
||||
</textField>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="6wP-A9-fuw" firstAttribute="centerX" secondItem="rTF-Av-Gl6" secondAttribute="centerX" id="Ch9-dM-KUe"/>
|
||||
<constraint firstItem="6wP-A9-fuw" firstAttribute="centerY" secondItem="rTF-Av-Gl6" secondAttribute="centerY" id="QQq-vN-xN6"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="textField" id="i19-Yq-4mF">
|
||||
<rect key="frame" x="0.0" y="187.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="i19-Yq-4mF" id="RSc-mr-TRr">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="D6m-mF-B3r">
|
||||
<rect key="frame" x="77.5" y="5" width="220" height="34"/>
|
||||
<constraints>
|
||||
<constraint firstItem="6hY-Wr-WkQ" firstAttribute="centerY" secondItem="Pbu-Mo-uwJ" secondAttribute="centerY" id="OnO-T7-ZUU"/>
|
||||
<constraint firstItem="6hY-Wr-WkQ" firstAttribute="centerX" secondItem="Pbu-Mo-uwJ" secondAttribute="centerX" id="aGR-0Y-ycU"/>
|
||||
<constraint firstAttribute="width" constant="220" id="Nex-2s-odm"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
<tableViewSection headerTitle="Specific Keyboard" id="8fd-bp-7eJ">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="mGp-N1-iXx">
|
||||
<rect key="frame" x="0.0" y="331.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="mGp-N1-iXx" id="odC-GC-3EW">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="3ok-UO-qNK">
|
||||
<rect key="frame" x="77.5" y="5" width="220" height="34"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="220" id="d07-kK-qmr"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits"/>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="DSJ-7r-oCY" id="CjX-Df-Mh3"/>
|
||||
</connections>
|
||||
</textField>
|
||||
</subviews>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits"/>
|
||||
</textField>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="D6m-mF-B3r" firstAttribute="centerY" secondItem="RSc-mr-TRr" secondAttribute="centerY" id="9NB-wB-rek"/>
|
||||
<constraint firstItem="D6m-mF-B3r" firstAttribute="centerX" secondItem="RSc-mr-TRr" secondAttribute="centerX" id="lL4-fs-w9G"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="secureTextField" id="q3S-83-5Zc">
|
||||
<rect key="frame" x="0.0" y="231.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="q3S-83-5Zc" id="ldB-99-6ew">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="01t-K1-N8y">
|
||||
<rect key="frame" x="77.5" y="5" width="220" height="34"/>
|
||||
<constraints>
|
||||
<constraint firstItem="3ok-UO-qNK" firstAttribute="centerY" secondItem="odC-GC-3EW" secondAttribute="centerY" id="O8S-Pd-mBi"/>
|
||||
<constraint firstItem="3ok-UO-qNK" firstAttribute="centerX" secondItem="odC-GC-3EW" secondAttribute="centerX" id="ZvK-c6-Jps"/>
|
||||
<constraint firstAttribute="width" constant="220" id="Oy2-bN-gOD"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
<tableViewSection headerTitle="Custom" id="l4j-0I-akf">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="p2q-cS-yAy">
|
||||
<rect key="frame" x="0.0" y="423.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="p2q-cS-yAy" id="bAa-ty-BjE">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="6mq-oY-1e5" customClass="CustomTextField" customModule="UIKitCatalog" customModuleProvider="target">
|
||||
<rect key="frame" x="77.5" y="7" width="220" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="30" id="Oha-uj-d5N"/>
|
||||
<constraint firstAttribute="width" constant="220" id="eUf-Cr-cPr"/>
|
||||
</constraints>
|
||||
<nil key="textColor"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits"/>
|
||||
</textField>
|
||||
</subviews>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits"/>
|
||||
</textField>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="01t-K1-N8y" firstAttribute="centerX" secondItem="ldB-99-6ew" secondAttribute="centerX" id="JQW-P1-dGM"/>
|
||||
<constraint firstItem="01t-K1-N8y" firstAttribute="centerY" secondItem="ldB-99-6ew" secondAttribute="centerY" id="jOt-ew-Rwg"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="specificKeyboardTextField" id="Zkk-A5-awr">
|
||||
<rect key="frame" x="0.0" y="275.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Zkk-A5-awr" id="WTM-Nr-vcg">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="adw-oz-cM4">
|
||||
<rect key="frame" x="77.5" y="5" width="220" height="34"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerX" secondItem="6mq-oY-1e5" secondAttribute="centerX" id="RXI-Mh-Ek3"/>
|
||||
<constraint firstAttribute="centerY" secondItem="6mq-oY-1e5" secondAttribute="centerY" id="dDm-B5-GZA"/>
|
||||
<constraint firstAttribute="width" constant="220" id="Oa9-Da-JNv"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
<tableViewSection headerTitle="Search" id="VUY-JJ-17B" userLabel="Search">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="bAz-f1-WeK">
|
||||
<rect key="frame" x="0.0" y="515.5" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="bAz-f1-WeK" id="Kgt-hf-9Hx">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="gmJ-iC-UR1" customClass="UISearchTextField">
|
||||
<rect key="frame" x="16" y="5" width="343" height="34"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits"/>
|
||||
</textField>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="gmJ-iC-UR1" firstAttribute="leading" secondItem="Kgt-hf-9Hx" secondAttribute="leading" constant="16" id="28g-0I-bAe"/>
|
||||
<constraint firstAttribute="trailing" secondItem="gmJ-iC-UR1" secondAttribute="trailing" constant="16" id="Jz1-Nh-QXZ"/>
|
||||
<constraint firstItem="gmJ-iC-UR1" firstAttribute="centerY" secondItem="Kgt-hf-9Hx" secondAttribute="centerY" id="Wkh-l0-hl5"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</cells>
|
||||
</tableViewSection>
|
||||
</sections>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits"/>
|
||||
</textField>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="adw-oz-cM4" firstAttribute="centerY" secondItem="WTM-Nr-vcg" secondAttribute="centerY" id="Dib-Er-1pc"/>
|
||||
<constraint firstItem="adw-oz-cM4" firstAttribute="centerX" secondItem="WTM-Nr-vcg" secondAttribute="centerX" id="qS2-qW-3Ge"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</prototypes>
|
||||
<sections/>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="DSJ-7r-oCY" id="13x-bY-Aua"/>
|
||||
<outlet property="delegate" destination="DSJ-7r-oCY" id="55q-Q9-lgO"/>
|
||||
|
|
@ -191,18 +157,15 @@
|
|||
</tableView>
|
||||
<navigationItem key="navigationItem" title="Text Fields" id="zBI-nb-i1W"/>
|
||||
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
|
||||
<connections>
|
||||
<outlet property="customTextField" destination="6mq-oY-1e5" id="Hmo-kx-Ova"/>
|
||||
<outlet property="searchTextField" destination="gmJ-iC-UR1" id="9C4-Vs-FF9"/>
|
||||
<outlet property="secureTextField" destination="6hY-Wr-WkQ" id="Q5H-ZR-LOf"/>
|
||||
<outlet property="specificKeyboardTextField" destination="3ok-UO-qNK" id="6Ba-Of-HrL"/>
|
||||
<outlet property="textField" destination="d0M-ZQ-Bl5" id="vN0-aU-p1n"/>
|
||||
<outlet property="tintedTextField" destination="HOG-Yp-juH" id="zFM-DP-kUM"/>
|
||||
</connections>
|
||||
</tableViewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="OdI-IP-47Q" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="7048.8000000000002" y="3367.4662668665669"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
|
|||
53
UIKitCatalog/Base.lproj/VisualEffectViewController.storyboard
Executable file
|
|
@ -0,0 +1,53 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19115.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Tca-bC-mV6">
|
||||
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19107.4"/>
|
||||
<capability name="Image references" minToolsVersion="12.0"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--SimpleApp-->
|
||||
<scene sceneID="F0r-75-F0c">
|
||||
<objects>
|
||||
<viewController storyboardIdentifier="VisualEffectViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="Tca-bC-mV6" customClass="VisualEffectViewController" customModule="UIKitCatalog" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="0ea-tg-uqz">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="lPK-uB-0lC">
|
||||
<rect key="frame" x="16" y="226" width="343" height="215"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="215" id="LuO-hI-dhF"/>
|
||||
<constraint firstAttribute="width" constant="343" id="gg5-5R-0of"/>
|
||||
</constraints>
|
||||
<imageReference key="image" image="Flowers_2"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="mbH-ch-V86"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<constraints>
|
||||
<constraint firstItem="lPK-uB-0lC" firstAttribute="centerY" secondItem="mbH-ch-V86" secondAttribute="centerY" id="B97-ip-aRP"/>
|
||||
<constraint firstItem="lPK-uB-0lC" firstAttribute="centerX" secondItem="mbH-ch-V86" secondAttribute="centerX" id="Rjo-2r-9Mh"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<navigationItem key="navigationItem" title="SimpleApp" id="LGU-hM-wnb"/>
|
||||
<connections>
|
||||
<outlet property="imageView" destination="lPK-uB-0lC" id="91A-hY-8tb"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="4pN-Sw-eWy" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-68" y="3357"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="Flowers_2" width="816" height="612"/>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
@ -10,6 +10,7 @@
|
|||
</head>
|
||||
<body>
|
||||
<br>
|
||||
<h1>This is HTML content inside a <u>WKWebView</u>.</h1>
|
||||
<h2>This is HTML content inside a <u>WKWebView</u>.</h2>
|
||||
For more information refer to <a href="https://developer.apple.com/documentation/webkit/wkwebview">developer.apple.com</a>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
52
UIKitCatalog/BaseTableViewController.swift
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
See LICENSE folder for this sample’s licensing information.
|
||||
|
||||
Abstract:
|
||||
A base class used for all UITableViewControllers in this sample app.
|
||||
*/
|
||||
|
||||
import UIKit
|
||||
|
||||
class BaseTableViewController: UITableViewController {
|
||||
// List of table view cell test cases.
|
||||
var testCells = [CaseElement]()
|
||||
|
||||
func centeredHeaderView(_ title: String) -> UITableViewHeaderFooterView {
|
||||
// Set the header title and make it centered.
|
||||
let headerView: UITableViewHeaderFooterView = UITableViewHeaderFooterView()
|
||||
var content = UIListContentConfiguration.groupedHeader()
|
||||
content.text = title
|
||||
content.textProperties.alignment = .center
|
||||
headerView.contentConfiguration = content
|
||||
return headerView
|
||||
}
|
||||
|
||||
// MARK: - UITableViewDataSource
|
||||
|
||||
override func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
|
||||
return centeredHeaderView(testCells[section].title)
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
|
||||
return testCells[section].title
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
override func numberOfSections(in tableView: UITableView) -> Int {
|
||||
return testCells.count
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView,
|
||||
cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||
let cellTest = testCells[indexPath.section]
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: cellTest.cellID, for: indexPath)
|
||||
if let view = cellTest.targetView(cell) {
|
||||
cellTest.configHandler(view)
|
||||
}
|
||||
return cell
|
||||
}
|
||||
|
||||
}
|
||||
468
UIKitCatalog/ButtonViewController+Configs.swift
Executable file
|
|
@ -0,0 +1,468 @@
|
|||
/*
|
||||
See LICENSE folder for this sample’s licensing information.
|
||||
|
||||
Abstract:
|
||||
Configuration functions for all the UIButtons found in ButtonViewController.
|
||||
*/
|
||||
|
||||
import UIKit
|
||||
|
||||
extension ButtonViewController: UIToolTipInteractionDelegate {
|
||||
|
||||
func configureSystemTextButton(_ button: UIButton) {
|
||||
button.setTitle(NSLocalizedString("Button", comment: ""), for: [])
|
||||
button.addTarget(self, action: #selector(ButtonViewController.buttonClicked(_:)), for: .touchUpInside)
|
||||
}
|
||||
func configureSystemDetailDisclosureButton(_ button: UIButton) {
|
||||
// Nothing particular to set here, it's all been done in the storyboard.
|
||||
button.addTarget(self, action: #selector(ButtonViewController.buttonClicked(_:)), for: .touchUpInside)
|
||||
}
|
||||
func configureSystemContactAddButton(_ button: UIButton) {
|
||||
// Nothing particular to set here, it's all been done in the storyboard.
|
||||
button.addTarget(self, action: #selector(ButtonViewController.buttonClicked(_:)), for: .touchUpInside)
|
||||
}
|
||||
|
||||
func configureCloseButton(_ button: UIButton) {
|
||||
// Nothing particular to set here, it's all been done in the storyboard.
|
||||
button.addTarget(self, action: #selector(ButtonViewController.buttonClicked(_:)), for: .touchUpInside)
|
||||
}
|
||||
|
||||
@available(iOS 15.0, *)
|
||||
func configureStyleGrayButton(_ button: UIButton) {
|
||||
// Note this can be also be done in the storyboard for this button.
|
||||
let config = UIButton.Configuration.gray()
|
||||
button.configuration = config
|
||||
|
||||
button.setTitle(NSLocalizedString("Button", comment: ""), for: .normal)
|
||||
button.toolTip = NSLocalizedString("GrayStyleButtonToolTipTitle", comment: "")
|
||||
|
||||
button.addTarget(self, action: #selector(ButtonViewController.buttonClicked(_:)), for: .touchUpInside)
|
||||
}
|
||||
|
||||
@available(iOS 15.0, *)
|
||||
func configureStyleTintedButton(_ button: UIButton) {
|
||||
// Note this can be also be done in the storyboard for this button.
|
||||
|
||||
var config = UIButton.Configuration.tinted()
|
||||
|
||||
/** To keep the look the same betwen iOS and macOS:
|
||||
For tinted color to work in Mac Catalyst, use UIBehavioralStyle as ".pad",
|
||||
Available in macOS 12 or later (Mac Catalyst 15.0 or later).
|
||||
Use this for controls that need to look the same between iOS and macOS.
|
||||
*/
|
||||
if traitCollection.userInterfaceIdiom == .mac {
|
||||
button.preferredBehavioralStyle = .pad
|
||||
}
|
||||
|
||||
// The following will make the button title red and background a lighter red.
|
||||
config.baseBackgroundColor = .systemRed
|
||||
config.baseForegroundColor = .systemRed
|
||||
|
||||
button.setTitle(NSLocalizedString("Button", comment: ""), for: .normal)
|
||||
button.toolTip = NSLocalizedString("TintedStyleButtonToolTipTitle", comment: "")
|
||||
|
||||
button.configuration = config
|
||||
|
||||
button.addTarget(self, action: #selector(ButtonViewController.buttonClicked(_:)), for: .touchUpInside)
|
||||
}
|
||||
|
||||
@available(iOS 15.0, *)
|
||||
func configureStyleFilledButton(_ button: UIButton) {
|
||||
// Note this can be also be done in the storyboard for this button.
|
||||
var config = UIButton.Configuration.filled()
|
||||
config.background.backgroundColor = .systemRed
|
||||
button.configuration = config
|
||||
|
||||
button.setTitle(NSLocalizedString("Button", comment: ""), for: .normal)
|
||||
button.toolTip = NSLocalizedString("FilledStyleButtonToolTipTitle", comment: "")
|
||||
|
||||
button.addTarget(self, action: #selector(ButtonViewController.buttonClicked(_:)), for: .touchUpInside)
|
||||
}
|
||||
|
||||
@available(iOS 15.0, *)
|
||||
func configureCornerStyleButton(_ button: UIButton) {
|
||||
/** To keep the look the same betwen iOS and macOS:
|
||||
For cornerStyle to work in Mac Catalyst, use UIBehavioralStyle as ".pad",
|
||||
Available in macOS 12 or later (Mac Catalyst 15.0 or later).
|
||||
Use this for controls that need to look the same between iOS and macOS.
|
||||
*/
|
||||
if traitCollection.userInterfaceIdiom == .mac {
|
||||
button.preferredBehavioralStyle = .pad
|
||||
}
|
||||
|
||||
var config = UIButton.Configuration.gray()
|
||||
config.cornerStyle = .capsule
|
||||
button.configuration = config
|
||||
|
||||
button.setTitle(NSLocalizedString("Button", comment: ""), for: .normal)
|
||||
button.toolTip = NSLocalizedString("CapsuleStyleButtonToolTipTitle", comment: "")
|
||||
|
||||
button.addTarget(self, action: #selector(ButtonViewController.buttonClicked(_:)), for: .touchUpInside)
|
||||
}
|
||||
|
||||
func configureImageButton(_ button: UIButton) {
|
||||
// To create this button in code you can use `UIButton.init(type: .system)`.
|
||||
|
||||
// Set the tint color to the button's image.
|
||||
if let image = UIImage(systemName: "xmark") {
|
||||
let imageButtonNormalImage = image.withTintColor(.systemPurple)
|
||||
button.setImage(imageButtonNormalImage, for: .normal)
|
||||
}
|
||||
|
||||
// Since this button title is just an image, add an accessibility label.
|
||||
button.accessibilityLabel = NSLocalizedString("X", comment: "")
|
||||
|
||||
if #available(iOS 15, *) {
|
||||
button.toolTip = NSLocalizedString("XButtonToolTipTitle", comment: "")
|
||||
}
|
||||
|
||||
button.addTarget(self, action: #selector(ButtonViewController.buttonClicked(_:)), for: .touchUpInside)
|
||||
}
|
||||
|
||||
func configureAttributedTextSystemButton(_ button: UIButton) {
|
||||
let buttonTitle = NSLocalizedString("Button", comment: "")
|
||||
|
||||
// Set the button's title for normal state.
|
||||
let normalTitleAttributes: [NSAttributedString.Key: Any] = [
|
||||
NSAttributedString.Key.strikethroughStyle: NSUnderlineStyle.single.rawValue
|
||||
]
|
||||
|
||||
let normalAttributedTitle = NSAttributedString(string: buttonTitle, attributes: normalTitleAttributes)
|
||||
button.setAttributedTitle(normalAttributedTitle, for: .normal)
|
||||
|
||||
// Set the button's title for highlighted state (note this is not supported in Mac Catalyst).
|
||||
let highlightedTitleAttributes: [NSAttributedString.Key: Any] = [
|
||||
NSAttributedString.Key.foregroundColor: UIColor.systemGreen,
|
||||
NSAttributedString.Key.strikethroughStyle: NSUnderlineStyle.thick.rawValue
|
||||
]
|
||||
let highlightedAttributedTitle = NSAttributedString(string: buttonTitle, attributes: highlightedTitleAttributes)
|
||||
button.setAttributedTitle(highlightedAttributedTitle, for: .highlighted)
|
||||
|
||||
button.addTarget(self, action: #selector(ButtonViewController.buttonClicked(_:)), for: .touchUpInside)
|
||||
}
|
||||
|
||||
func configureSymbolButton(_ button: UIButton) {
|
||||
let buttonImage = UIImage(systemName: "person")
|
||||
|
||||
if #available(iOS 15, *) {
|
||||
// For iOS 15 use the UIButtonConfiguration to set the image.
|
||||
var buttonConfig = UIButton.Configuration.plain()
|
||||
buttonConfig.image = buttonImage
|
||||
button.configuration = buttonConfig
|
||||
|
||||
button.toolTip = NSLocalizedString("PersonButtonToolTipTitle", comment: "")
|
||||
} else {
|
||||
button.setImage(buttonImage, for: .normal)
|
||||
}
|
||||
|
||||
let config = UIImage.SymbolConfiguration(textStyle: .body, scale: .large)
|
||||
button.setPreferredSymbolConfiguration(config, forImageIn: .normal)
|
||||
|
||||
// Since this button title is just an image, add an accessibility label.
|
||||
button.accessibilityLabel = NSLocalizedString("Person", comment: "")
|
||||
|
||||
button.addTarget(self, action: #selector(ButtonViewController.buttonClicked(_:)), for: .touchUpInside)
|
||||
}
|
||||
|
||||
func configureLargeSymbolButton(_ button: UIButton) {
|
||||
let buttonImage = UIImage(systemName: "person")
|
||||
|
||||
if #available(iOS 15, *) {
|
||||
// For iOS 15 use the UIButtonConfiguration to change the size.
|
||||
var buttonConfig = UIButton.Configuration.plain()
|
||||
buttonConfig.preferredSymbolConfigurationForImage = UIImage.SymbolConfiguration(textStyle: .largeTitle)
|
||||
buttonConfig.image = buttonImage
|
||||
button.configuration = buttonConfig
|
||||
} else {
|
||||
button.setImage(buttonImage, for: .normal)
|
||||
}
|
||||
|
||||
// Since this button title is just an image, add an accessibility label.
|
||||
button.accessibilityLabel = NSLocalizedString("Person", comment: "")
|
||||
|
||||
button.addTarget(self, action: #selector(ButtonViewController.buttonClicked(_:)), for: .touchUpInside)
|
||||
}
|
||||
|
||||
func configureSymbolTextButton(_ button: UIButton) {
|
||||
// Button with image to the left of the title.
|
||||
|
||||
let buttonImage = UIImage(systemName: "person")
|
||||
|
||||
if #available(iOS 15, *) {
|
||||
// Use UIButtonConfiguration to set the image.
|
||||
var buttonConfig = UIButton.Configuration.plain()
|
||||
|
||||
// Set up the symbol image size to match that of the title font size.
|
||||
buttonConfig.preferredSymbolConfigurationForImage = UIImage.SymbolConfiguration(textStyle: .body)
|
||||
buttonConfig.image = buttonImage
|
||||
|
||||
button.configuration = buttonConfig
|
||||
} else {
|
||||
button.setImage(buttonImage, for: .normal)
|
||||
|
||||
// Set up the symbol image size to match that of the title font size.
|
||||
let config = UIImage.SymbolConfiguration(textStyle: .body, scale: .small)
|
||||
button.setPreferredSymbolConfiguration(config, forImageIn: .normal)
|
||||
}
|
||||
|
||||
// Set the button's title and font.
|
||||
button.setTitle(NSLocalizedString("Person", comment: ""), for: [])
|
||||
button.titleLabel?.font = UIFont.preferredFont(forTextStyle: .body)
|
||||
|
||||
button.addTarget(self, action: #selector(ButtonViewController.buttonClicked(_:)), for: .touchUpInside)
|
||||
}
|
||||
|
||||
func configureTextSymbolButton(_ button: UIButton) {
|
||||
// Button with image to the right of the title.
|
||||
|
||||
let buttonImage = UIImage(systemName: "person")
|
||||
|
||||
if #available(iOS 15, *) {
|
||||
// Use UIButtonConfiguration to set the image.
|
||||
var buttonConfig = UIButton.Configuration.plain()
|
||||
|
||||
// Set up the symbol image size to match that of the title font size.
|
||||
buttonConfig.preferredSymbolConfigurationForImage = UIImage.SymbolConfiguration(textStyle: .body)
|
||||
|
||||
buttonConfig.image = buttonImage
|
||||
|
||||
// Set the image placement to the right of the title.
|
||||
/** For image placement to work in Mac Catalyst, use UIBehavioralStyle as ".pad",
|
||||
Available in macOS 12 or later (Mac Catalyst 15.0 or later).
|
||||
Use this for controls that need to look the same between iOS and macOS.
|
||||
*/
|
||||
if traitCollection.userInterfaceIdiom == .mac {
|
||||
button.preferredBehavioralStyle = .pad
|
||||
}
|
||||
buttonConfig.imagePlacement = .trailing
|
||||
|
||||
button.configuration = buttonConfig
|
||||
}
|
||||
|
||||
// Set the button's title and font.
|
||||
button.setTitle(NSLocalizedString("Person", comment: ""), for: [])
|
||||
button.titleLabel?.font = UIFont.preferredFont(forTextStyle: .body)
|
||||
|
||||
button.addTarget(self, action: #selector(ButtonViewController.buttonClicked(_:)), for: .touchUpInside)
|
||||
}
|
||||
|
||||
@available(iOS 15.0, *)
|
||||
func configureMultiTitleButton(_ button: UIButton) {
|
||||
/** To keep the look the same betwen iOS and macOS:
|
||||
For setTitle(.highlighted) to work in Mac Catalyst, use UIBehavioralStyle as ".pad",
|
||||
Available in macOS 12 or later (Mac Catalyst 15.0 or later).
|
||||
Use this for controls that need to look the same between iOS and macOS.
|
||||
*/
|
||||
if traitCollection.userInterfaceIdiom == .mac {
|
||||
button.preferredBehavioralStyle = .pad
|
||||
}
|
||||
|
||||
button.setTitle(NSLocalizedString("Button", comment: ""), for: .normal)
|
||||
button.setTitle(NSLocalizedString("Pressed", comment: ""), for: .highlighted)
|
||||
|
||||
button.addTarget(self, action: #selector(ButtonViewController.buttonClicked(_:)), for: .touchUpInside)
|
||||
}
|
||||
|
||||
@available(iOS 15.0, *)
|
||||
func configureToggleButton(button: UIButton) {
|
||||
button.changesSelectionAsPrimaryAction = true // This makes the button style a "toggle button".
|
||||
}
|
||||
|
||||
func configureTitleTextButton(_ button: UIButton) {
|
||||
// Note: Only for iOS the title's color can be changed.
|
||||
button.setTitleColor(UIColor.systemGreen, for: [.normal])
|
||||
button.setTitleColor(UIColor.systemRed, for: [.highlighted])
|
||||
|
||||
button.addTarget(self, action: #selector(ButtonViewController.buttonClicked(_:)), for: .touchUpInside)
|
||||
}
|
||||
|
||||
func configureBackgroundButton(_ button: UIButton) {
|
||||
if #available(iOS 15, *) {
|
||||
/** To keep the look the same betwen iOS and macOS:
|
||||
For setBackgroundImage to work in Mac Catalyst, use UIBehavioralStyle as ".pad",
|
||||
Available in macOS 12 or later (Mac Catalyst 15.0 or later).
|
||||
Use this for controls that need to look the same between iOS and macOS.
|
||||
*/
|
||||
if traitCollection.userInterfaceIdiom == .mac {
|
||||
button.preferredBehavioralStyle = .pad
|
||||
}
|
||||
}
|
||||
|
||||
button.setBackgroundImage(UIImage(named: "background"), for: .normal)
|
||||
button.setBackgroundImage(UIImage(named: "background_highlighted"), for: .highlighted)
|
||||
button.setBackgroundImage(UIImage(named: "background_disabled"), for: .disabled)
|
||||
|
||||
button.addTarget(self, action: #selector(ButtonViewController.buttonClicked(_:)), for: .touchUpInside)
|
||||
}
|
||||
|
||||
// This handler is called when this button needs updating.
|
||||
@available(iOS 15.0, *)
|
||||
func configureUpdateActivityHandlerButton(_ button: UIButton) {
|
||||
let activityUpdateHandler: (UIButton) -> Void = { button in
|
||||
/// Shows an activity indicator in place of an image. Its placement is controlled by the `imagePlacement` property.
|
||||
|
||||
// Start with the current button's configuration.
|
||||
var config = button.configuration
|
||||
config?.showsActivityIndicator = button.isSelected ? false : true
|
||||
button.configuration = config
|
||||
}
|
||||
|
||||
var buttonConfig = UIButton.Configuration.plain()
|
||||
buttonConfig.image = UIImage(systemName: "tray")
|
||||
buttonConfig.preferredSymbolConfigurationForImage = UIImage.SymbolConfiguration(textStyle: .body)
|
||||
button.configuration = buttonConfig
|
||||
|
||||
// Set the button's title and font.
|
||||
button.setTitle(NSLocalizedString("Button", comment: ""), for: [])
|
||||
button.titleLabel?.font = UIFont.preferredFont(forTextStyle: .body)
|
||||
|
||||
button.changesSelectionAsPrimaryAction = true // This turns on the toggle behavior.
|
||||
button.configurationUpdateHandler = activityUpdateHandler
|
||||
|
||||
// For this button to include an activity indicator next to the title, keep the iPad behavior.
|
||||
if traitCollection.userInterfaceIdiom == .mac {
|
||||
button.preferredBehavioralStyle = .pad
|
||||
}
|
||||
|
||||
button.addTarget(self, action: #selector(ButtonViewController.toggleButtonClicked(_:)), for: .touchUpInside)
|
||||
}
|
||||
|
||||
@available(iOS 15.0, *)
|
||||
func configureUpdateHandlerButton(_ button: UIButton) {
|
||||
// This is called when a button needs an update.
|
||||
let colorUpdateHandler: (UIButton) -> Void = { button in
|
||||
button.configuration?.baseBackgroundColor = button.isSelected
|
||||
? UIColor.systemPink.withAlphaComponent(0.4)
|
||||
: UIColor.systemPink
|
||||
}
|
||||
|
||||
let buttonConfig = UIButton.Configuration.filled()
|
||||
button.configuration = buttonConfig
|
||||
|
||||
button.changesSelectionAsPrimaryAction = true // This turns on the toggle behavior.
|
||||
button.configurationUpdateHandler = colorUpdateHandler
|
||||
|
||||
// For this button to use baseBackgroundColor for the visual toggle state, keep the iPad behavior.
|
||||
if traitCollection.userInterfaceIdiom == .mac {
|
||||
button.preferredBehavioralStyle = .pad
|
||||
}
|
||||
|
||||
button.addTarget(self, action: #selector(ButtonViewController.toggleButtonClicked(_:)), for: .touchUpInside)
|
||||
}
|
||||
|
||||
@available(iOS 15.0, *)
|
||||
func configureUpdateImageHandlerButton(_ button: UIButton) {
|
||||
// This is called when a button needs an update.
|
||||
let colorUpdateHandler: (UIButton) -> Void = { button in
|
||||
button.configuration?.image =
|
||||
button.isSelected ? UIImage(systemName: "cart.fill") : UIImage(systemName: "cart")
|
||||
button.toolTip =
|
||||
button.isSelected ?
|
||||
NSLocalizedString("CartFilledButtonToolTipTitle", comment: "") :
|
||||
NSLocalizedString("CartEmptyButtonToolTipTitle", comment: "")
|
||||
}
|
||||
|
||||
var buttonConfig = UIButton.Configuration.plain()
|
||||
buttonConfig.image = UIImage(systemName: "cart")
|
||||
buttonConfig.preferredSymbolConfigurationForImage = UIImage.SymbolConfiguration(textStyle: .largeTitle)
|
||||
button.configuration = buttonConfig
|
||||
|
||||
button.changesSelectionAsPrimaryAction = true // This turns on the toggle behavior.
|
||||
button.configurationUpdateHandler = colorUpdateHandler
|
||||
|
||||
// For this button to use the updateHandler to change it's icon for the visual toggle state, keep the iPad behavior.
|
||||
if traitCollection.userInterfaceIdiom == .mac {
|
||||
button.preferredBehavioralStyle = .pad
|
||||
}
|
||||
|
||||
button.setTitle("", for: []) // No title, just an image.
|
||||
button.isSelected = false
|
||||
|
||||
button.addTarget(self, action: #selector(ButtonViewController.toggleButtonClicked(_:)), for: .touchUpInside)
|
||||
}
|
||||
|
||||
// MARK: - Add To Cart Button
|
||||
|
||||
@available(iOS 15.0, *)
|
||||
func toolTipInteraction(_ interaction: UIToolTipInteraction, configurationAt point: CGPoint) -> UIToolTipConfiguration? {
|
||||
let formatString = NSLocalizedString("Cart Tooltip String",
|
||||
comment: "Cart Tooltip String format to be found in Localizable.stringsdict")
|
||||
let resultString = String.localizedStringWithFormat(formatString, cartItemCount)
|
||||
return UIToolTipConfiguration(toolTip: resultString)
|
||||
}
|
||||
|
||||
@available(iOS 15.0, *)
|
||||
func addToCart(action: UIAction) {
|
||||
cartItemCount = cartItemCount > 0 ? 0 : 12
|
||||
if let button = action.sender as? UIButton {
|
||||
button.setNeedsUpdateConfiguration()
|
||||
}
|
||||
}
|
||||
|
||||
@available(iOS 15.0, *)
|
||||
func configureAddToCartButton(_ button: UIButton) {
|
||||
var config = UIButton.Configuration.filled()
|
||||
config.buttonSize = .large
|
||||
config.image = UIImage(systemName: "cart.fill")
|
||||
config.title = "Add to Cart"
|
||||
config.cornerStyle = .capsule
|
||||
config.baseBackgroundColor = UIColor.systemTeal
|
||||
button.configuration = config
|
||||
|
||||
button.toolTip = "" // The value will be determined in its delegate.
|
||||
button.toolTipInteraction?.delegate = self
|
||||
|
||||
button.addAction(UIAction(handler: addToCart(action:)), for: .touchUpInside)
|
||||
|
||||
// For this button to include subtitle and larger size, the behavioral style needs to be set to ".pad".
|
||||
if traitCollection.userInterfaceIdiom == .mac {
|
||||
button.preferredBehavioralStyle = .pad
|
||||
}
|
||||
|
||||
button.changesSelectionAsPrimaryAction = true // This turns on the toggle behavior.
|
||||
|
||||
// This handler is called when this button needs updating.
|
||||
button.configurationUpdateHandler = {
|
||||
[unowned self] button in
|
||||
|
||||
// Start with the current button's configuration.
|
||||
var newConfig = button.configuration
|
||||
|
||||
if button.isSelected {
|
||||
// The button was clicked or tapped.
|
||||
newConfig?.image = cartItemCount > 0
|
||||
? UIImage(systemName: "cart.fill.badge.plus")
|
||||
: UIImage(systemName: "cart.badge.plus")
|
||||
|
||||
let formatString = NSLocalizedString("Cart Items String",
|
||||
comment: "Cart Items String format to be found in Localizable.stringsdict")
|
||||
let resultString = String.localizedStringWithFormat(formatString, cartItemCount)
|
||||
newConfig?.subtitle = resultString
|
||||
} else {
|
||||
// As the button is highlighted (pressed), apply a temporary image and subtitle.
|
||||
newConfig?.image = UIImage(systemName: "cart.fill")
|
||||
newConfig?.subtitle = ""
|
||||
}
|
||||
|
||||
newConfig?.imagePadding = 8 // Add a litle more space between the icon and button title.
|
||||
|
||||
// Note: To change the padding between the title and subtitle, set "titlePadding".
|
||||
// Note: To change the padding around the perimeter of the button, set "contentInsets".
|
||||
|
||||
button.configuration = newConfig
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Button Actions
|
||||
|
||||
@objc
|
||||
func buttonClicked(_ sender: UIButton) {
|
||||
Swift.debugPrint("Button was clicked.")
|
||||
}
|
||||
|
||||
@objc
|
||||
func toggleButtonClicked(_ sender: UIButton) {
|
||||
Swift.debugPrint("Toggle action: \(sender)")
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -11,138 +11,146 @@ A view controller that demonstrates how to use `UIButton`.
|
|||
|
||||
import UIKit
|
||||
|
||||
class ButtonViewController: UITableViewController {
|
||||
class ButtonViewController: BaseTableViewController {
|
||||
|
||||
// Cell identifier for each button table view cell.
|
||||
enum ButtonKind: String, CaseIterable {
|
||||
case buttonSystem
|
||||
case buttonDetailDisclosure
|
||||
case buttonSystemAddContact
|
||||
case buttonClose
|
||||
case buttonStyleGray
|
||||
case buttonStyleTinted
|
||||
case buttonStyleFilled
|
||||
case buttonCornerStyle
|
||||
case buttonToggle
|
||||
case buttonTitleColor
|
||||
case buttonImage
|
||||
case buttonAttrText
|
||||
case buttonSymbol
|
||||
case buttonLargeSymbol
|
||||
case buttonTextSymbol
|
||||
case buttonSymbolText
|
||||
case buttonMultiTitle
|
||||
case buttonBackground
|
||||
case addToCartButton
|
||||
case buttonUpdateActivityHandler
|
||||
case buttonUpdateHandler
|
||||
case buttonImageUpdateHandler
|
||||
}
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
@IBOutlet weak var systemTextButton: UIButton!
|
||||
@IBOutlet weak var systemContactAddButton: UIButton!
|
||||
@IBOutlet weak var systemDetailDisclosureButton: UIButton!
|
||||
@IBOutlet weak var imageButton: UIButton!
|
||||
@IBOutlet weak var attributedTextButton: UIButton!
|
||||
@IBOutlet weak var symbolButton: UIButton!
|
||||
@IBOutlet weak var symbolTextButton: UIButton!
|
||||
@IBOutlet weak var menuButton: UIButton!
|
||||
// "Add to Cart" Button
|
||||
var cartItemCount: Int = 0
|
||||
|
||||
// MARK: - View Life Cycle
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
// All of the buttons are created in the storyboard, but configured below.
|
||||
configureSystemTextButton()
|
||||
configureSystemContactAddButton()
|
||||
configureSystemDetailDisclosureButton()
|
||||
configureImageButton()
|
||||
configureAttributedTextSystemButton()
|
||||
configureSymbolButton()
|
||||
configureSymbolTextButton()
|
||||
configureMenuButton()
|
||||
}
|
||||
|
||||
// MARK: - Configuration
|
||||
|
||||
func configureSystemTextButton() {
|
||||
let buttonTitle = NSLocalizedString("Button", comment: "")
|
||||
|
||||
systemTextButton.setTitle(buttonTitle, for: .normal)
|
||||
|
||||
systemTextButton.addTarget(self, action: #selector(ButtonViewController.buttonClicked(_:)), for: .touchUpInside)
|
||||
}
|
||||
|
||||
func configureSystemContactAddButton() {
|
||||
systemContactAddButton.backgroundColor = UIColor.clear
|
||||
|
||||
systemContactAddButton.addTarget(self, action: #selector(ButtonViewController.buttonClicked(_:)), for: .touchUpInside)
|
||||
}
|
||||
|
||||
func configureSystemDetailDisclosureButton() {
|
||||
systemDetailDisclosureButton.backgroundColor = UIColor.clear
|
||||
|
||||
systemDetailDisclosureButton.addTarget(self, action: #selector(ButtonViewController.buttonClicked(_:)), for: .touchUpInside)
|
||||
}
|
||||
|
||||
func configureImageButton() {
|
||||
// To create this button in code you can use `UIButton.init(type: .system)`.
|
||||
|
||||
// Set the tint color to the button's image.
|
||||
if let image = UIImage(named: "x_icon") {
|
||||
let imageButtonNormalImage = image.withTintColor(.systemPurple)
|
||||
imageButton.setImage(imageButtonNormalImage, for: .normal)
|
||||
|
||||
testCells.append(contentsOf: [
|
||||
CaseElement(title: NSLocalizedString("DefaultTitle", comment: ""),
|
||||
cellID: ButtonKind.buttonSystem.rawValue,
|
||||
configHandler: configureSystemTextButton),
|
||||
CaseElement(title: NSLocalizedString("DetailDisclosureTitle", comment: ""),
|
||||
cellID: ButtonKind.buttonDetailDisclosure.rawValue,
|
||||
configHandler: configureSystemDetailDisclosureButton),
|
||||
CaseElement(title: NSLocalizedString("AddContactTitle", comment: ""),
|
||||
cellID: ButtonKind.buttonSystemAddContact.rawValue,
|
||||
configHandler: configureSystemContactAddButton),
|
||||
CaseElement(title: NSLocalizedString("CloseTitle", comment: ""),
|
||||
cellID: ButtonKind.buttonClose.rawValue,
|
||||
configHandler: configureCloseButton)
|
||||
])
|
||||
|
||||
if #available(iOS 15, *) {
|
||||
// These button styles are available on iOS 15 or later.
|
||||
testCells.append(contentsOf: [
|
||||
CaseElement(title: NSLocalizedString("GrayTitle", comment: ""),
|
||||
cellID: ButtonKind.buttonStyleGray.rawValue,
|
||||
configHandler: configureStyleGrayButton),
|
||||
CaseElement(title: NSLocalizedString("TintedTitle", comment: ""),
|
||||
cellID: ButtonKind.buttonStyleTinted.rawValue,
|
||||
configHandler: configureStyleTintedButton),
|
||||
CaseElement(title: NSLocalizedString("FilledTitle", comment: ""),
|
||||
cellID: ButtonKind.buttonStyleFilled.rawValue,
|
||||
configHandler: configureStyleFilledButton),
|
||||
CaseElement(title: NSLocalizedString("CornerStyleTitle", comment: ""),
|
||||
cellID: ButtonKind.buttonCornerStyle.rawValue,
|
||||
configHandler: configureCornerStyleButton),
|
||||
CaseElement(title: NSLocalizedString("ToggleTitle", comment: ""),
|
||||
cellID: ButtonKind.buttonToggle.rawValue,
|
||||
configHandler: configureToggleButton)
|
||||
])
|
||||
}
|
||||
|
||||
if traitCollection.userInterfaceIdiom != .mac {
|
||||
// Colored button titles only on iOS.
|
||||
testCells.append(contentsOf: [
|
||||
CaseElement(title: NSLocalizedString("ButtonColorTitle", comment: ""),
|
||||
cellID: ButtonKind.buttonTitleColor.rawValue,
|
||||
configHandler: configureTitleTextButton)
|
||||
])
|
||||
}
|
||||
|
||||
testCells.append(contentsOf: [
|
||||
CaseElement(title: NSLocalizedString("ImageTitle", comment: ""),
|
||||
cellID: ButtonKind.buttonImage.rawValue,
|
||||
configHandler: configureImageButton),
|
||||
CaseElement(title: NSLocalizedString("AttributedStringTitle", comment: ""),
|
||||
cellID: ButtonKind.buttonAttrText.rawValue,
|
||||
configHandler: configureAttributedTextSystemButton),
|
||||
CaseElement(title: NSLocalizedString("SymbolTitle", comment: ""),
|
||||
cellID: ButtonKind.buttonSymbol.rawValue,
|
||||
configHandler: configureSymbolButton)
|
||||
])
|
||||
|
||||
if #available(iOS 15, *) {
|
||||
// This case uses UIButtonConfiguration which is available on iOS 15 or later.
|
||||
if traitCollection.userInterfaceIdiom != .mac {
|
||||
// UIButtonConfiguration for large images available only on iOS.
|
||||
testCells.append(contentsOf: [
|
||||
CaseElement(title: NSLocalizedString("LargeSymbolTitle", comment: ""),
|
||||
cellID: ButtonKind.buttonLargeSymbol.rawValue,
|
||||
configHandler: configureLargeSymbolButton)
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
if #available(iOS 15, *) {
|
||||
testCells.append(contentsOf: [
|
||||
CaseElement(title: NSLocalizedString("StringSymbolTitle", comment: ""),
|
||||
cellID: ButtonKind.buttonTextSymbol.rawValue,
|
||||
configHandler: configureTextSymbolButton),
|
||||
CaseElement(title: NSLocalizedString("SymbolStringTitle", comment: ""),
|
||||
cellID: ButtonKind.buttonSymbolText.rawValue,
|
||||
configHandler: configureSymbolTextButton),
|
||||
|
||||
// Add an accessibility label to the image.
|
||||
imageButton.accessibilityLabel = NSLocalizedString("X", comment: "")
|
||||
|
||||
imageButton.addTarget(self, action: #selector(ButtonViewController.buttonClicked(_:)), for: .touchUpInside)
|
||||
}
|
||||
|
||||
func configureAttributedTextSystemButton() {
|
||||
let buttonTitle = NSLocalizedString("Button", comment: "")
|
||||
|
||||
// Set the button's title for normal state.
|
||||
let normalTitleAttributes: [NSAttributedString.Key: Any] = [
|
||||
NSAttributedString.Key.strikethroughStyle: NSUnderlineStyle.single.rawValue
|
||||
]
|
||||
|
||||
let normalAttributedTitle = NSAttributedString(string: buttonTitle, attributes: normalTitleAttributes)
|
||||
attributedTextButton.setAttributedTitle(normalAttributedTitle, for: .normal)
|
||||
|
||||
// Set the button's title for highlighted state.
|
||||
let highlightedTitleAttributes: [NSAttributedString.Key: Any] = [
|
||||
NSAttributedString.Key.foregroundColor: UIColor.systemGreen,
|
||||
NSAttributedString.Key.strikethroughStyle: NSUnderlineStyle.thick.rawValue
|
||||
]
|
||||
let highlightedAttributedTitle = NSAttributedString(string: buttonTitle, attributes: highlightedTitleAttributes)
|
||||
attributedTextButton.setAttributedTitle(highlightedAttributedTitle, for: .highlighted)
|
||||
|
||||
attributedTextButton.addTarget(self, action: #selector(ButtonViewController.buttonClicked(_:)), for: .touchUpInside)
|
||||
}
|
||||
|
||||
func configureSymbolButton() {
|
||||
let buttonImage = UIImage(systemName: "person")
|
||||
symbolButton.setImage(buttonImage, for: .normal)
|
||||
|
||||
// Add an accessibility label to the image.
|
||||
symbolButton.accessibilityLabel = NSLocalizedString("Person", comment: "")
|
||||
|
||||
symbolButton.addTarget(self,
|
||||
action: #selector(ButtonViewController.buttonClicked(_:)),
|
||||
for: .touchUpInside)
|
||||
}
|
||||
|
||||
func configureSymbolTextButton() {
|
||||
let buttonImage = UIImage(systemName: "person")
|
||||
symbolTextButton.setImage(buttonImage, for: .normal)
|
||||
|
||||
symbolTextButton.addTarget(self,
|
||||
action: #selector(ButtonViewController.buttonClicked(_:)),
|
||||
for: .touchUpInside)
|
||||
|
||||
symbolTextButton.titleLabel?.font = UIFont.preferredFont(forTextStyle: .body)
|
||||
let config = UIImage.SymbolConfiguration(textStyle: .body, scale: .small)
|
||||
symbolTextButton.setPreferredSymbolConfiguration(config, forImageIn: .normal)
|
||||
}
|
||||
|
||||
func menuHandler(action: UIAction) {
|
||||
Swift.debugPrint("Menu Action '\(action.title)'")
|
||||
}
|
||||
|
||||
func configureMenuButton() {
|
||||
let buttonTitle = NSLocalizedString("Button", comment: "")
|
||||
menuButton.setTitle(buttonTitle, for: .normal)
|
||||
|
||||
let items = (1...5).map {
|
||||
UIAction(title: String(format: NSLocalizedString("ItemTitle", comment: ""), $0.description), handler: menuHandler)
|
||||
CaseElement(title: NSLocalizedString("BackgroundTitle", comment: ""),
|
||||
cellID: ButtonKind.buttonBackground.rawValue,
|
||||
configHandler: configureBackgroundButton),
|
||||
|
||||
// Multi-title button: title for normal and highlight state, setTitle(.highlighted) is for iOS 15 and later.
|
||||
CaseElement(title: NSLocalizedString("MultiTitleTitle", comment: ""),
|
||||
cellID: ButtonKind.buttonMultiTitle.rawValue,
|
||||
configHandler: configureMultiTitleButton),
|
||||
|
||||
// Various button effects done to the addToCartButton are available only on iOS 15 or later.
|
||||
CaseElement(title: NSLocalizedString("AddToCartTitle", comment: ""),
|
||||
cellID: ButtonKind.addToCartButton.rawValue,
|
||||
configHandler: configureAddToCartButton),
|
||||
|
||||
// UIButtonConfiguration with updateHandlers is available only on iOS 15 or later.
|
||||
CaseElement(title: NSLocalizedString("UpdateActivityHandlerTitle", comment: ""),
|
||||
cellID: ButtonKind.buttonUpdateActivityHandler.rawValue,
|
||||
configHandler: configureUpdateActivityHandlerButton),
|
||||
CaseElement(title: NSLocalizedString("UpdateHandlerTitle", comment: ""),
|
||||
cellID: ButtonKind.buttonUpdateHandler.rawValue,
|
||||
configHandler: configureUpdateHandlerButton),
|
||||
CaseElement(title: NSLocalizedString("UpdateImageHandlerTitle", comment: ""),
|
||||
cellID: ButtonKind.buttonImageUpdateHandler.rawValue,
|
||||
configHandler: configureUpdateImageHandlerButton)
|
||||
])
|
||||
}
|
||||
menuButton.menu = UIMenu(title: NSLocalizedString("ChooseItemTitle", comment: ""), children: items)
|
||||
menuButton.showsMenuAsPrimaryAction = true
|
||||
}
|
||||
|
||||
// MARK: - Actions
|
||||
|
||||
@objc
|
||||
func buttonClicked(_ sender: UIButton) {
|
||||
print("A button was clicked: \(sender).")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
29
UIKitCatalog/CaseElement.swift
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
See LICENSE folder for this sample’s licensing information.
|
||||
|
||||
Abstract:
|
||||
Test case element that serves our UITableViewCells.
|
||||
*/
|
||||
|
||||
import UIKit
|
||||
|
||||
struct CaseElement {
|
||||
var title: String // Visual title of the cell (table section header title)
|
||||
var cellID: String // Table view cell's identifier for searching for the cell within the nib file.
|
||||
|
||||
typealias ConfigurationClosure = (UIView) -> Void
|
||||
var configHandler: ConfigurationClosure // Configuration handler for setting up the cell's subview.
|
||||
|
||||
init<V: UIView>(title: String, cellID: String, configHandler: @escaping (V) -> Void) {
|
||||
self.title = title
|
||||
self.cellID = cellID
|
||||
self.configHandler = { view in
|
||||
guard let view = view as? V else { fatalError("Impossible") }
|
||||
configHandler(view)
|
||||
}
|
||||
}
|
||||
|
||||
func targetView(_ cell: UITableViewCell?) -> UIView? {
|
||||
return cell != nil ? cell!.contentView.subviews[0] : nil
|
||||
}
|
||||
}
|
||||
|
|
@ -28,13 +28,14 @@ class ColorPickerViewController: UIViewController, UIColorPickerViewControllerDe
|
|||
configureColorWell()
|
||||
|
||||
// For iOS, the picker button in the main view is not used, the color picker is presented from the navigation bar.
|
||||
if navigationController!.traitCollection.userInterfaceIdiom != .mac {
|
||||
if navigationController?.traitCollection.userInterfaceIdiom != .mac {
|
||||
pickerButton.isHidden = true
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - UIColorWell
|
||||
|
||||
// Update the color view from the color well chosen action.
|
||||
func colorWellHandler(action: UIAction) {
|
||||
if let colorWell = action.sender as? UIColorWell {
|
||||
colorView.backgroundColor = colorWell.selectedColor
|
||||
|
|
@ -48,11 +49,10 @@ class ColorPickerViewController: UIViewController, UIColorPickerViewControllerDe
|
|||
*/
|
||||
let colorWellAction = UIAction(title: "", handler: colorWellHandler)
|
||||
colorWell =
|
||||
UIColorWell(frame: CGRect(x: 0, y: 0, width: 32, height: 32),
|
||||
primaryAction: colorWellAction)
|
||||
UIColorWell(frame: CGRect(x: 0, y: 0, width: 32, height: 32), primaryAction: colorWellAction)
|
||||
|
||||
// For Mac Catalyst, the UIColorWell is placed in the main view.
|
||||
if navigationController!.traitCollection.userInterfaceIdiom == .mac {
|
||||
if navigationController?.traitCollection.userInterfaceIdiom == .mac {
|
||||
pickerWellView.addSubview(colorWell)
|
||||
} else {
|
||||
// For iOS, the UIColorWell is placed inside the navigation bar as a UIBarButtonItem.
|
||||
|
|
@ -75,7 +75,7 @@ class ColorPickerViewController: UIViewController, UIColorPickerViewControllerDe
|
|||
// Present the color picker from the UIBarButtonItem, iOS only.
|
||||
// This will present it as a popover (preferred), or for compact mode as a modal sheet.
|
||||
@IBAction func presentColorPickerByBarButton(_ sender: UIBarButtonItem) {
|
||||
colorPicker.modalPresentationStyle = UIModalPresentationStyle.popover
|
||||
colorPicker.modalPresentationStyle = UIModalPresentationStyle.popover // will display as popover for iPad or sheet for compact screens.
|
||||
let popover: UIPopoverPresentationController = colorPicker.popoverPresentationController!
|
||||
popover.barButtonItem = sender
|
||||
present(colorPicker, animated: true, completion: nil)
|
||||
|
|
@ -85,19 +85,53 @@ class ColorPickerViewController: UIViewController, UIColorPickerViewControllerDe
|
|||
// This will present it as a popover (preferred), or for compact mode as a modal sheet.
|
||||
@IBAction func presentColorPickerByButton(_ sender: UIButton) {
|
||||
colorPicker.modalPresentationStyle = UIModalPresentationStyle.popover
|
||||
let popover: UIPopoverPresentationController = colorPicker.popoverPresentationController!
|
||||
popover.sourceView = sender
|
||||
present(colorPicker, animated: true, completion: nil)
|
||||
if let popover = colorPicker.popoverPresentationController {
|
||||
popover.sourceView = sender
|
||||
present(colorPicker, animated: true, completion: nil)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - UIColorPickerViewControllerDelegate
|
||||
|
||||
// Color returned from the color picker via UIBarButtonItem - iOS 15.0
|
||||
@available(iOS 15.0, *)
|
||||
func colorPickerViewController(_ viewController: UIColorPickerViewController, didSelect color: UIColor, continuously: Bool) {
|
||||
// User has chosen a color.
|
||||
let chosenColor = viewController.selectedColor
|
||||
colorView.backgroundColor = chosenColor
|
||||
|
||||
// Dismiss the color picker if the conditions are right:
|
||||
// 1) User is not doing a continous pick (tap and drag across multiple colors).
|
||||
// 2) Picker is presented on a non-compact device.
|
||||
//
|
||||
// Use the following check to determine how the color picker was presented (modal or popover).
|
||||
// For popover, we want to dismiss it when a color is locked.
|
||||
// For modal, the picker has a close button.
|
||||
//
|
||||
if !continuously {
|
||||
if traitCollection.horizontalSizeClass != .compact {
|
||||
viewController.dismiss(animated: true, completion: {
|
||||
Swift.debugPrint("\(chosenColor)")
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Color returned from the color picker - iOS 14.x and earlier.
|
||||
func colorPickerViewControllerDidSelectColor(_ viewController: UIColorPickerViewController) {
|
||||
// User has chosen a color.
|
||||
let chosenColor = viewController.selectedColor
|
||||
colorView.backgroundColor = chosenColor
|
||||
|
||||
Swift.debugPrint("\(chosenColor)")
|
||||
// Use the following check to determine how the color picker was presented (modal or popover).
|
||||
// For popover, we want to dismiss it when a color is locked.
|
||||
// For modal, the picker has a close button.
|
||||
//
|
||||
if traitCollection.horizontalSizeClass != .compact {
|
||||
viewController.dismiss(animated: true, completion: {
|
||||
Swift.debugPrint("\(chosenColor)")
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func colorPickerViewControllerDidFinish(_ viewController: UIColorPickerViewController) {
|
||||
|
|
@ -108,16 +142,3 @@ class ColorPickerViewController: UIViewController, UIColorPickerViewControllerDe
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
extension UIColor {
|
||||
var colorComponents: (red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat)? {
|
||||
guard let components = self.cgColor.components else { return nil }
|
||||
|
||||
return (
|
||||
red: components[0],
|
||||
green: components[1],
|
||||
blue: components[2],
|
||||
alpha: components[3]
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class CustomPageControlViewController: UIViewController {
|
|||
@objc
|
||||
func pageControlValueDidChange() {
|
||||
// Note: gesture swiping between pages is provided by `UIPageViewController` and not `UIPageControl`.
|
||||
print("The page control changed its current page to \(pageControl.currentPage).")
|
||||
Swift.debugPrint("The page control changed its current page to \(pageControl.currentPage).")
|
||||
|
||||
colorView.backgroundColor = colors[pageControl.currentPage]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,19 +43,19 @@ class CustomSearchBarViewController: UIViewController {
|
|||
|
||||
extension CustomSearchBarViewController: UISearchBarDelegate {
|
||||
func searchBarSearchButtonClicked(_ searchBar: UISearchBar) {
|
||||
print("The custom search bar keyboard \"Search\" button was tapped.")
|
||||
Swift.debugPrint("The custom search bar keyboard \"Search\" button was tapped.")
|
||||
|
||||
searchBar.resignFirstResponder()
|
||||
}
|
||||
|
||||
func searchBarCancelButtonClicked(_ searchBar: UISearchBar) {
|
||||
print("The custom search bar \"Cancel\" button was tapped.")
|
||||
Swift.debugPrint("The custom search bar \"Cancel\" button was tapped.")
|
||||
|
||||
searchBar.resignFirstResponder()
|
||||
}
|
||||
|
||||
func searchBarBookmarkButtonClicked(_ searchBar: UISearchBar) {
|
||||
print("The custom \"bookmark button\" inside the search bar was tapped.")
|
||||
Swift.debugPrint("The custom \"bookmark button\" inside the search bar was tapped.")
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ class CustomToolbarViewController: UIViewController {
|
|||
let attributes = [
|
||||
NSAttributedString.Key.foregroundColor: UIColor.systemPurple
|
||||
]
|
||||
barButtonItem.setTitleTextAttributes(attributes, for: .normal)
|
||||
barButtonItem.setTitleTextAttributes(attributes, for: [])
|
||||
|
||||
return barButtonItem
|
||||
}
|
||||
|
|
@ -66,7 +66,7 @@ class CustomToolbarViewController: UIViewController {
|
|||
|
||||
@objc
|
||||
func barButtonItemClicked(_ barButtonItem: UIBarButtonItem) {
|
||||
print("A bar button item on the custom toolbar was clicked: \(barButtonItem).")
|
||||
Swift.debugPrint("A bar button item on the custom toolbar was clicked: \(barButtonItem).")
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,12 @@ class DatePickerController: UIViewController {
|
|||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
if #available(iOS 15, *) {
|
||||
// In case the label's content is too large to fit inside the label (causing truncation),
|
||||
// use this to reveal the label's full text drawn as a tool tip.
|
||||
dateLabel.showsExpansionTextWhenTruncated = true
|
||||
}
|
||||
|
||||
configureDatePicker()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ class PageControlViewController: UIViewController {
|
|||
@objc
|
||||
func pageControlValueDidChange() {
|
||||
// Note: gesture swiping between pages is provided by `UIPageViewController` and not `UIPageControl`.
|
||||
print("The page control changed its current page to \(pageControl.currentPage).")
|
||||
Swift.debugPrint("The page control changed its current page to \(pageControl.currentPage).")
|
||||
|
||||
colorView.backgroundColor = colors[pageControl.currentPage]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,17 +38,17 @@ class DefaultSearchBarViewController: UIViewController {
|
|||
|
||||
extension DefaultSearchBarViewController: UISearchBarDelegate {
|
||||
func searchBar(_ searchBar: UISearchBar, selectedScopeButtonIndexDidChange selectedScope: Int) {
|
||||
print("The default search selected scope button index changed to \(selectedScope).")
|
||||
Swift.debugPrint("The default search selected scope button index changed to \(selectedScope).")
|
||||
}
|
||||
|
||||
func searchBarSearchButtonClicked(_ searchBar: UISearchBar) {
|
||||
print("The default search bar keyboard search button was tapped: \(String(describing: searchBar.text)).")
|
||||
Swift.debugPrint("The default search bar keyboard search button was tapped: \(String(describing: searchBar.text)).")
|
||||
|
||||
searchBar.resignFirstResponder()
|
||||
}
|
||||
|
||||
func searchBarCancelButtonClicked(_ searchBar: UISearchBar) {
|
||||
print("The default search bar cancel button was tapped.")
|
||||
Swift.debugPrint("The default search bar cancel button was tapped.")
|
||||
|
||||
searchBar.resignFirstResponder()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,6 +55,6 @@ class DefaultToolbarViewController: UIViewController {
|
|||
|
||||
@objc
|
||||
func barButtonItemClicked(_ barButtonItem: UIBarButtonItem) {
|
||||
print("A bar button item on the default toolbar was clicked: \(barButtonItem).")
|
||||
Swift.debugPrint("A bar button item on the default toolbar was clicked: \(barButtonItem).")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,10 +26,10 @@ class FontPickerViewController: UIViewController {
|
|||
|
||||
configureFontPicker()
|
||||
|
||||
#if !targetEnvironment(macCatalyst)
|
||||
if traitCollection.userInterfaceIdiom != .mac {
|
||||
// UITextFormattingCoordinator's toggleFontPanel is available only for macOS.
|
||||
textFormatterButton.isHidden = true
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
override func viewDidAppear(_ animated: Bool) {
|
||||
|
|
|
|||
|
|
@ -32,6 +32,13 @@ class ImageViewController: UIViewController {
|
|||
|
||||
imageView.isAccessibilityElement = true
|
||||
imageView.accessibilityLabel = NSLocalizedString("Animated", comment: "")
|
||||
|
||||
if #available(iOS 15, *) {
|
||||
// This case uses UIToolTipInteraction which is available on iOS 15 or later.
|
||||
let interaction =
|
||||
UIToolTipInteraction(defaultToolTip: NSLocalizedString("ImageToolTipTitle", comment: ""))
|
||||
imageView.addInteraction(interaction)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
184
UIKitCatalog/MenuButtonViewController.swift
Executable file
|
|
@ -0,0 +1,184 @@
|
|||
/*
|
||||
See LICENSE folder for this sample’s licensing information.
|
||||
|
||||
Abstract:
|
||||
A view controller that demonstrates how to attach menus to `UIButton`.
|
||||
*/
|
||||
|
||||
import UIKit
|
||||
|
||||
class MenuButtonViewController: BaseTableViewController {
|
||||
|
||||
// Cell identifier for each menu button table view cell.
|
||||
enum MenuButtonKind: String, CaseIterable {
|
||||
case buttonMenuProgrammatic
|
||||
case buttonMenuMultiAction
|
||||
case buttonSubMenu
|
||||
case buttonMenuSelection
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
testCells.append(contentsOf: [
|
||||
CaseElement(title: NSLocalizedString("DropDownProgTitle", comment: ""),
|
||||
cellID: MenuButtonKind.buttonMenuProgrammatic.rawValue,
|
||||
configHandler: configureDropDownProgrammaticButton),
|
||||
CaseElement(title: NSLocalizedString("DropDownMultiActionTitle", comment: ""),
|
||||
cellID: MenuButtonKind.buttonMenuMultiAction.rawValue,
|
||||
configHandler: configureDropdownMultiActionButton),
|
||||
CaseElement(title: NSLocalizedString("DropDownButtonSubMenuTitle", comment: ""),
|
||||
cellID: MenuButtonKind.buttonSubMenu.rawValue,
|
||||
configHandler: configureDropdownSubMenuButton),
|
||||
CaseElement(title: NSLocalizedString("PopupSelection", comment: ""),
|
||||
cellID: MenuButtonKind.buttonMenuSelection.rawValue,
|
||||
configHandler: configureSelectionPopupButton)
|
||||
])
|
||||
}
|
||||
|
||||
// MARK: - Handlers
|
||||
|
||||
enum ButtonMenuActionIdentifiers: String {
|
||||
case item1
|
||||
case item2
|
||||
case item3
|
||||
}
|
||||
func menuHandler(action: UIAction) {
|
||||
switch action.identifier.rawValue {
|
||||
case ButtonMenuActionIdentifiers.item1.rawValue:
|
||||
Swift.debugPrint("Menu Action: item 1")
|
||||
case ButtonMenuActionIdentifiers.item2.rawValue:
|
||||
Swift.debugPrint("Menu Action: item 2")
|
||||
case ButtonMenuActionIdentifiers.item3.rawValue:
|
||||
Swift.debugPrint("Menu Action: item 3")
|
||||
default: break
|
||||
}
|
||||
}
|
||||
|
||||
func item4Handler(action: UIAction) {
|
||||
Swift.debugPrint("Menu Action: \(action.title)")
|
||||
}
|
||||
|
||||
// MARK: - Drop Down Menu Buttons
|
||||
|
||||
func configureDropDownProgrammaticButton(button: UIButton) {
|
||||
button.menu = UIMenu(children: [
|
||||
UIAction(title: String(format: NSLocalizedString("ItemTitle", comment: ""), "1"),
|
||||
identifier: UIAction.Identifier(ButtonMenuActionIdentifiers.item1.rawValue),
|
||||
handler: menuHandler),
|
||||
UIAction(title: String(format: NSLocalizedString("ItemTitle", comment: ""), "2"),
|
||||
identifier: UIAction.Identifier(ButtonMenuActionIdentifiers.item2.rawValue),
|
||||
handler: menuHandler)
|
||||
])
|
||||
|
||||
button.showsMenuAsPrimaryAction = true
|
||||
}
|
||||
|
||||
func configureDropdownMultiActionButton(button: UIButton) {
|
||||
let buttonMenu = UIMenu(children: [
|
||||
// Share a single handler for the first 3 actions.
|
||||
UIAction(title: String(format: NSLocalizedString("ItemTitle", comment: ""), "1"),
|
||||
image: UIImage(systemName: "1.circle"),
|
||||
identifier: UIAction.Identifier(ButtonMenuActionIdentifiers.item1.rawValue),
|
||||
attributes: [],
|
||||
handler: menuHandler),
|
||||
UIAction(title: String(format: NSLocalizedString("ItemTitle", comment: ""), "2"),
|
||||
image: UIImage(systemName: "2.circle"),
|
||||
identifier: UIAction.Identifier(ButtonMenuActionIdentifiers.item2.rawValue),
|
||||
handler: menuHandler),
|
||||
UIAction(title: String(format: NSLocalizedString("ItemTitle", comment: ""), "3"),
|
||||
image: UIImage(systemName: "3.circle"),
|
||||
identifier: UIAction.Identifier(ButtonMenuActionIdentifiers.item3.rawValue),
|
||||
handler: menuHandler),
|
||||
|
||||
// Use a separate handler for this 4th action.
|
||||
UIAction(title: String(format: NSLocalizedString("ItemTitle", comment: ""), "4"),
|
||||
image: UIImage(systemName: "4.circle"),
|
||||
identifier: nil,
|
||||
handler: item4Handler(action:)),
|
||||
|
||||
// Use a closure for the 5th action.
|
||||
UIAction(title: String(format: NSLocalizedString("ItemTitle", comment: ""), "5"),
|
||||
image: UIImage(systemName: "5.circle"),
|
||||
identifier: nil) { action in
|
||||
Swift.debugPrint("Menu Action: \(action.title)")
|
||||
},
|
||||
|
||||
// Use attributes to make the 6th action disabled.
|
||||
UIAction(title: String(format: NSLocalizedString("ItemTitle", comment: ""), "6"),
|
||||
image: UIImage(systemName: "6.circle"),
|
||||
identifier: nil,
|
||||
attributes: [UIMenuElement.Attributes.disabled]) { action in
|
||||
Swift.debugPrint("Menu Action: \(action.title)")
|
||||
}
|
||||
])
|
||||
button.menu = buttonMenu
|
||||
|
||||
// This makes the button behave like a drop down menu.
|
||||
button.showsMenuAsPrimaryAction = true
|
||||
}
|
||||
|
||||
func configureDropdownSubMenuButton(button: UIButton) {
|
||||
let sortClosure = { (action: UIAction) in
|
||||
Swift.debugPrint("Sort by: \(action.title)")
|
||||
}
|
||||
let refreshClosure = { (action: UIAction) in
|
||||
Swift.debugPrint("Refresh handler")
|
||||
}
|
||||
let accountHandler = { (action: UIAction) in
|
||||
Swift.debugPrint("Account handler")
|
||||
}
|
||||
|
||||
var sortMenu: UIMenu
|
||||
if #available(iOS 15, *) { // .singleSelection option only on iOS 15 or later
|
||||
// The sort sub menu supports a selection.
|
||||
sortMenu = UIMenu(title: "Sort By", options: .singleSelection, children: [
|
||||
UIAction(title: "Date", state: .on, handler: sortClosure),
|
||||
UIAction(title: "Size", handler: sortClosure)
|
||||
])
|
||||
} else {
|
||||
sortMenu = UIMenu(title: "Sort By", children: [
|
||||
UIAction(title: "Date", handler: sortClosure),
|
||||
UIAction(title: "Size", handler: sortClosure)
|
||||
])
|
||||
}
|
||||
|
||||
let topMenu = UIMenu(children: [
|
||||
UIAction(title: "Refresh", handler: refreshClosure),
|
||||
UIAction(title: "Account", handler: accountHandler),
|
||||
sortMenu
|
||||
])
|
||||
|
||||
// This makes the button behave like a drop down menu.
|
||||
button.showsMenuAsPrimaryAction = true
|
||||
button.menu = topMenu
|
||||
}
|
||||
|
||||
// MARK: - Selection Popup Menu Button
|
||||
|
||||
func updateColor(_ title: String) {
|
||||
Swift.debugPrint("Color selected: \(title)")
|
||||
}
|
||||
|
||||
func configureSelectionPopupButton(button: UIButton) {
|
||||
let colorClosure = { [unowned self] (action: UIAction) in
|
||||
self.updateColor(action.title)
|
||||
}
|
||||
|
||||
button.menu = UIMenu(children: [
|
||||
UIAction(title: "Red", handler: colorClosure),
|
||||
UIAction(title: "Green", state: .on, handler: colorClosure), // The default selected item (green).
|
||||
UIAction(title: "Blue", handler: colorClosure)
|
||||
])
|
||||
|
||||
// This makes the button behave like a drop down menu.
|
||||
button.showsMenuAsPrimaryAction = true
|
||||
|
||||
if #available(iOS 15, *) {
|
||||
button.changesSelectionAsPrimaryAction = true
|
||||
// Select the default menu item (green).
|
||||
updateColor((button.menu?.selectedElements.first!.title)!)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -39,6 +39,8 @@ class OutlineViewController: UIViewController {
|
|||
var dataSource: UICollectionViewDiffableDataSource<Section, OutlineItem>! = nil
|
||||
var outlineCollectionView: UICollectionView! = nil
|
||||
|
||||
private var detailTargetChangeObserver: Any? = nil
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
|
|
@ -48,52 +50,68 @@ class OutlineViewController: UIViewController {
|
|||
// Add a translucent background to the primary view controller for the Mac.
|
||||
splitViewController!.primaryBackgroundStyle = .sidebar
|
||||
view.backgroundColor = UIColor.clear
|
||||
|
||||
// Listen for when a split view controller is expanded or collapsed.
|
||||
NotificationCenter.default.addObserver(
|
||||
self,
|
||||
selector: #selector(showDetailTargetDidChange(_:)),
|
||||
name: UIViewController.showDetailTargetDidChangeNotification,
|
||||
object: nil)
|
||||
|
||||
// Listen for when the split view controller is expanded or collapsed for iPad multi-tasking,
|
||||
// and on device rotate (iPhones that support regular size class).
|
||||
detailTargetChangeObserver =
|
||||
NotificationCenter.default.addObserver(forName: UIViewController.showDetailTargetDidChangeNotification,
|
||||
object: nil,
|
||||
queue: OperationQueue.main,
|
||||
using: { _ in
|
||||
// Posted when a split view controller is expanded or collapsed.
|
||||
|
||||
// Re-load the data source, the disclosure indicators need to change (push vs. present on a cell).
|
||||
var snapshot = self.dataSource.snapshot()
|
||||
snapshot.reloadItems(self.menuItems)
|
||||
self.dataSource.apply(snapshot, animatingDifferences: false)
|
||||
})
|
||||
|
||||
if navigationController!.traitCollection.userInterfaceIdiom == .mac {
|
||||
navigationController!.navigationBar.isHidden = true
|
||||
}
|
||||
}
|
||||
|
||||
// Posted when a split view controller is expanded or collapsed.
|
||||
@objc
|
||||
func showDetailTargetDidChange(_ notification: NSNotification) {
|
||||
// Reaload the data source, the disclosure indicators need to change (push vs. present on a cell).
|
||||
var snapshot = dataSource.snapshot()
|
||||
snapshot.reloadItems(menuItems)
|
||||
dataSource.apply(snapshot, animatingDifferences: false)
|
||||
}
|
||||
|
||||
deinit {
|
||||
NotificationCenter.default.removeObserver(self, name: UIViewController.showDetailTargetDidChangeNotification, object: nil)
|
||||
if let observer = detailTargetChangeObserver {
|
||||
NotificationCenter.default.removeObserver(observer)
|
||||
}
|
||||
}
|
||||
|
||||
lazy var controlsOutlineItem: OutlineItem = {
|
||||
var controlsSubItems = [
|
||||
OutlineItem(title: NSLocalizedString("ButtonsTitle", comment: ""), imageName: nil,
|
||||
|
||||
// Determine the content of the UIButton grouping.
|
||||
var buttonItems = [
|
||||
OutlineItem(title: NSLocalizedString("ButtonsTitle", comment: ""), imageName: "rectangle",
|
||||
storyboardName: "ButtonViewController"),
|
||||
OutlineItem(title: NSLocalizedString("MenuButtonsTitle", comment: ""), imageName: "list.bullet.rectangle",
|
||||
storyboardName: "MenuButtonViewController")
|
||||
]
|
||||
// UIPointerInteraction to UIButtons is applied for iPad.
|
||||
if navigationController!.traitCollection.userInterfaceIdiom == .pad {
|
||||
buttonItems.append(contentsOf:
|
||||
[OutlineItem(title: NSLocalizedString("PointerInteractionButtonsTitle", comment: ""),
|
||||
imageName: "cursorarrow.rays",
|
||||
storyboardName: "PointerInteractionButtonViewController") ])
|
||||
}
|
||||
|
||||
var controlsSubItems = [
|
||||
OutlineItem(title: NSLocalizedString("ButtonsTitle", comment: ""), imageName: "rectangle.on.rectangle", subitems: buttonItems),
|
||||
|
||||
OutlineItem(title: NSLocalizedString("PageControlTitle", comment: ""), imageName: nil, subitems: [
|
||||
OutlineItem(title: NSLocalizedString("PageControlTitle", comment: ""), imageName: "photo.on.rectangle", subitems: [
|
||||
OutlineItem(title: NSLocalizedString("DefaultPageControlTitle", comment: ""), imageName: nil,
|
||||
storyboardName: "DefaultPageControlViewController"),
|
||||
OutlineItem(title: NSLocalizedString("CustomPageControlTitle", comment: ""), imageName: nil,
|
||||
storyboardName: "CustomPageControlViewController")
|
||||
]),
|
||||
|
||||
OutlineItem(title: NSLocalizedString("SearchBarsTitle", comment: ""), imageName: nil, subitems: [
|
||||
OutlineItem(title: NSLocalizedString("SearchBarsTitle", comment: ""), imageName: "magnifyingglass", subitems: [
|
||||
OutlineItem(title: NSLocalizedString("DefaultSearchBarTitle", comment: ""), imageName: nil,
|
||||
storyboardName: "DefaultSearchBarViewController"),
|
||||
OutlineItem(title: NSLocalizedString("CustomSearchBarTitle", comment: ""), imageName: nil,
|
||||
storyboardName: "CustomSearchBarViewController")
|
||||
]),
|
||||
|
||||
OutlineItem(title: NSLocalizedString("SegmentedControlsTitle", comment: ""), imageName: nil,
|
||||
OutlineItem(title: NSLocalizedString("SegmentedControlsTitle", comment: ""), imageName: "square.split.3x1",
|
||||
storyboardName: "SegmentedControlViewController"),
|
||||
OutlineItem(title: NSLocalizedString("SlidersTitle", comment: ""), imageName: nil,
|
||||
storyboardName: "SliderViewController"),
|
||||
|
|
@ -103,15 +121,12 @@ class OutlineViewController: UIViewController {
|
|||
storyboardName: "TextFieldViewController")
|
||||
]
|
||||
|
||||
#if !targetEnvironment(macCatalyst)
|
||||
/** Because this sample has "Optimize Interface for Mac" turned on -
|
||||
UIStepper class is not supported when running Mac Catalyst apps in the Mac idiom.
|
||||
*/
|
||||
let stepperItem =
|
||||
OutlineItem(title: NSLocalizedString("SteppersTitle", comment: ""), imageName: nil,
|
||||
storyboardName: "StepperViewController")
|
||||
controlsSubItems.append(stepperItem)
|
||||
#endif
|
||||
if traitCollection.userInterfaceIdiom != .mac {
|
||||
// UIStepper class is not supported when running Mac Catalyst apps in the Mac idiom.
|
||||
let stepperItem =
|
||||
OutlineItem(title: NSLocalizedString("SteppersTitle", comment: ""), imageName: nil, storyboardName: "StepperViewController")
|
||||
controlsSubItems.append(stepperItem)
|
||||
}
|
||||
|
||||
return OutlineItem(title: "Controls", imageName: "slider.horizontal.3", subitems: controlsSubItems)
|
||||
}()
|
||||
|
|
@ -128,15 +143,13 @@ class OutlineViewController: UIViewController {
|
|||
storyboardName: "ImagePickerViewController")
|
||||
]
|
||||
|
||||
#if !targetEnvironment(macCatalyst)
|
||||
/** Because this sample has "Optimize Interface for Mac" turned on -
|
||||
UIPickerView class is not supported when running Mac Catalyst apps in the Mac idiom.
|
||||
*/
|
||||
let pickerViewItem =
|
||||
OutlineItem(title: NSLocalizedString("PickerViewTitle", comment: ""), imageName: nil,
|
||||
storyboardName: "PickerViewController")
|
||||
pickerSubItems.append(pickerViewItem)
|
||||
#endif
|
||||
if traitCollection.userInterfaceIdiom != .mac {
|
||||
// UIPickerView class is not supported when running Mac Catalyst apps in the Mac idiom.
|
||||
// To use a picker in macOS, use UIButton with changesSelectionAsPrimaryAction set to "true".
|
||||
let pickerViewItem =
|
||||
OutlineItem(title: NSLocalizedString("PickerViewTitle", comment: ""), imageName: nil, storyboardName: "PickerViewController")
|
||||
pickerSubItems.append(pickerViewItem)
|
||||
}
|
||||
|
||||
return OutlineItem(title: "Pickers", imageName: "list.bullet", subitems: pickerSubItems)
|
||||
}()
|
||||
|
|
@ -147,14 +160,22 @@ class OutlineViewController: UIViewController {
|
|||
storyboardName: "ActivityIndicatorViewController"),
|
||||
OutlineItem(title: NSLocalizedString("AlertControllersTitle", comment: ""), imageName: nil,
|
||||
storyboardName: "AlertControllerViewController"),
|
||||
OutlineItem(title: NSLocalizedString("ImageViewTitle", comment: ""), imageName: nil,
|
||||
storyboardName: "ImageViewController"),
|
||||
OutlineItem(title: NSLocalizedString("TextViewTitle", comment: ""), imageName: nil,
|
||||
storyboardName: "TextViewController"),
|
||||
|
||||
OutlineItem(title: NSLocalizedString("ImagesTitle", comment: ""), imageName: "photo", subitems: [
|
||||
OutlineItem(title: NSLocalizedString("ImageViewTitle", comment: ""), imageName: nil,
|
||||
storyboardName: "ImageViewController"),
|
||||
OutlineItem(title: NSLocalizedString("SymbolsTitle", comment: ""), imageName: nil,
|
||||
storyboardName: "SymbolViewController")
|
||||
]),
|
||||
|
||||
OutlineItem(title: NSLocalizedString("ProgressViewsTitle", comment: ""), imageName: nil,
|
||||
storyboardName: "ProgressViewController"),
|
||||
OutlineItem(title: NSLocalizedString("StackViewsTitle", comment: ""), imageName: nil,
|
||||
storyboardName: "StackViewController"),
|
||||
|
||||
OutlineItem(title: NSLocalizedString("ToolbarsTitle", comment: ""), imageName: nil, subitems: [
|
||||
OutlineItem(title: NSLocalizedString("ToolbarsTitle", comment: ""), imageName: "hammer", subitems: [
|
||||
OutlineItem(title: NSLocalizedString("DefaultToolBarTitle", comment: ""), imageName: nil,
|
||||
storyboardName: "DefaultToolbarViewController"),
|
||||
OutlineItem(title: NSLocalizedString("TintedToolbarTitle", comment: ""), imageName: nil,
|
||||
|
|
@ -163,8 +184,9 @@ class OutlineViewController: UIViewController {
|
|||
storyboardName: "CustomToolbarViewController")
|
||||
]),
|
||||
|
||||
OutlineItem(title: NSLocalizedString("WebViewTitle", comment: ""), imageName: nil,
|
||||
storyboardName: "WebViewController")
|
||||
OutlineItem(title: NSLocalizedString("VisualEffectTitle", comment: ""), imageName: nil, storyboardName: "VisualEffectViewController"),
|
||||
|
||||
OutlineItem(title: NSLocalizedString("WebViewTitle", comment: ""), imageName: nil, storyboardName: "WebViewController")
|
||||
])
|
||||
}()
|
||||
|
||||
|
|
@ -198,24 +220,29 @@ extension OutlineViewController {
|
|||
var contentConfiguration = cell.defaultContentConfiguration()
|
||||
contentConfiguration.text = menuItem.title
|
||||
|
||||
if menuItem.imageName != nil {
|
||||
contentConfiguration.image = UIImage(systemName: menuItem.imageName!)
|
||||
if let image = menuItem.imageName {
|
||||
contentConfiguration.image = UIImage(systemName: image)
|
||||
}
|
||||
|
||||
contentConfiguration.textProperties.font = .preferredFont(forTextStyle: .headline)
|
||||
cell.contentConfiguration = contentConfiguration
|
||||
|
||||
let disclosureOptions = UICellAccessory.OutlineDisclosureOptions(style: .header)
|
||||
cell.accessories = [.outlineDisclosure(options:disclosureOptions)]
|
||||
cell.accessories = [.outlineDisclosure(options: disclosureOptions)]
|
||||
|
||||
let background = UIBackgroundConfiguration.clear()
|
||||
cell.backgroundConfiguration = background
|
||||
}
|
||||
|
||||
let cellRegistration = UICollectionView.CellRegistration<UICollectionViewListCell, OutlineItem> { cell, indexPath, menuItem in
|
||||
var content = UIListContentConfiguration.cell()
|
||||
content.text = menuItem.title
|
||||
cell.contentConfiguration = content
|
||||
var contentConfiguration = cell.defaultContentConfiguration()
|
||||
contentConfiguration.text = menuItem.title
|
||||
|
||||
if let image = menuItem.imageName {
|
||||
contentConfiguration.image = UIImage(systemName: image)
|
||||
}
|
||||
|
||||
cell.contentConfiguration = contentConfiguration
|
||||
|
||||
let background = UIBackgroundConfiguration.clear()
|
||||
cell.backgroundConfiguration = background
|
||||
|
|
@ -295,6 +322,14 @@ extension OutlineViewController: UICollectionViewDelegate {
|
|||
|
||||
if let storyboardName = menuItem.storyboardName {
|
||||
pushOrPresentStoryboard(storyboardName: storyboardName)
|
||||
|
||||
if navigationController!.traitCollection.userInterfaceIdiom == .mac {
|
||||
if let windowScene = view.window?.windowScene {
|
||||
if #available(iOS 15, *) {
|
||||
windowScene.subtitle = menuItem.title
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
168
UIKitCatalog/PointerInteractionButtonViewController.swift
Executable file
|
|
@ -0,0 +1,168 @@
|
|||
/*
|
||||
See LICENSE folder for this sample’s licensing information.
|
||||
|
||||
Abstract:
|
||||
A view controller that demonstrates how to intergrate pointer interactions to `UIButton`.
|
||||
*/
|
||||
|
||||
import UIKit
|
||||
|
||||
class PointerInteractionButtonViewController: BaseTableViewController {
|
||||
|
||||
// Cell identifier for each button pointer table view cell.
|
||||
enum PointerButtonKind: String, CaseIterable {
|
||||
case buttonPointer
|
||||
case buttonHighlight
|
||||
case buttonLift
|
||||
case buttonHover
|
||||
case buttonCustom
|
||||
}
|
||||
|
||||
// The pointer effect kind to use for each button (corresponds to the button's view tag).
|
||||
enum ButtonPointerEffectKind: Int {
|
||||
case pointer = 1
|
||||
case highlight
|
||||
case lift
|
||||
case hover
|
||||
case custom
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
testCells.append(contentsOf: [
|
||||
CaseElement(title: "UIPointerEffect.automatic",
|
||||
cellID: PointerButtonKind.buttonPointer.rawValue,
|
||||
configHandler: configurePointerButton),
|
||||
CaseElement(title: "UIPointerEffect.highlight",
|
||||
cellID: PointerButtonKind.buttonHighlight.rawValue,
|
||||
configHandler: configureHighlightButton),
|
||||
CaseElement(title: "UIPointerEffect.lift",
|
||||
cellID: PointerButtonKind.buttonLift.rawValue,
|
||||
configHandler: configureLiftButton),
|
||||
CaseElement(title: "UIPointerEffect.hover",
|
||||
cellID: PointerButtonKind.buttonHover.rawValue,
|
||||
configHandler: configureHoverButton),
|
||||
CaseElement(title: "UIPointerEffect (custom)",
|
||||
cellID: PointerButtonKind.buttonCustom.rawValue,
|
||||
configHandler: configureCustomButton)
|
||||
])
|
||||
}
|
||||
|
||||
// MARK: - Configurations
|
||||
|
||||
func configurePointerButton(button: UIButton) {
|
||||
button.pointerStyleProvider = defaultButtonProvider
|
||||
}
|
||||
|
||||
func configureHighlightButton(button: UIButton) {
|
||||
button.pointerStyleProvider = highlightButtonProvider
|
||||
}
|
||||
|
||||
func configureLiftButton(button: UIButton) {
|
||||
button.pointerStyleProvider = liftButtonProvider
|
||||
}
|
||||
|
||||
func configureHoverButton(button: UIButton) {
|
||||
button.pointerStyleProvider = hoverButtonProvider
|
||||
}
|
||||
|
||||
func configureCustomButton(button: UIButton) {
|
||||
button.pointerStyleProvider = customButtonProvider
|
||||
}
|
||||
|
||||
// MARK: Button Pointer Providers
|
||||
|
||||
func defaultButtonProvider(button: UIButton, pointerEffect: UIPointerEffect, pointerShape: UIPointerShape) -> UIPointerStyle? {
|
||||
var buttonPointerStyle: UIPointerStyle? = nil
|
||||
|
||||
// Use the pointer effect's preview that's passed in.
|
||||
let targetedPreview = pointerEffect.preview
|
||||
|
||||
/** UIPointerEffect.automatic attempts to determine the appropriate effect for the given preview automatically.
|
||||
The pointer effect has an automatic nature which adapts to the aspects of the button (background color, corner radius, size)
|
||||
*/
|
||||
let buttonPointerEffect = UIPointerEffect.automatic(targetedPreview)
|
||||
buttonPointerStyle = UIPointerStyle(effect: buttonPointerEffect, shape: pointerShape)
|
||||
return buttonPointerStyle
|
||||
}
|
||||
|
||||
func highlightButtonProvider(button: UIButton, pointerEffect: UIPointerEffect, pointerShape: UIPointerShape) -> UIPointerStyle? {
|
||||
var buttonPointerStyle: UIPointerStyle? = nil
|
||||
|
||||
// Use the pointer effect's preview that's passed in.
|
||||
let targetedPreview = pointerEffect.preview
|
||||
|
||||
// Pointer slides under the given view and morphs into the view's shape.
|
||||
let buttonHighlightPointerEffect = UIPointerEffect.highlight(targetedPreview)
|
||||
buttonPointerStyle = UIPointerStyle(effect: buttonHighlightPointerEffect, shape: pointerShape)
|
||||
|
||||
return buttonPointerStyle
|
||||
}
|
||||
|
||||
func liftButtonProvider(button: UIButton, pointerEffect: UIPointerEffect, pointerShape: UIPointerShape) -> UIPointerStyle? {
|
||||
var buttonPointerStyle: UIPointerStyle? = nil
|
||||
|
||||
// Use the pointer effect's preview that's passed in.
|
||||
let targetedPreview = pointerEffect.preview
|
||||
|
||||
/** Pointer slides under the given view and disappears as the view scales up and gains a shadow.
|
||||
Make the pointer shape’s bounds match the view’s frame so the highlight extends to the edges.
|
||||
*/
|
||||
let buttonLiftPointerEffect = UIPointerEffect.lift(targetedPreview)
|
||||
let customPointerShape = UIPointerShape.path(UIBezierPath(roundedRect: button.bounds, cornerRadius: 6.0))
|
||||
buttonPointerStyle = UIPointerStyle(effect: buttonLiftPointerEffect, shape: customPointerShape)
|
||||
|
||||
return buttonPointerStyle
|
||||
}
|
||||
|
||||
func hoverButtonProvider(button: UIButton, pointerEffect: UIPointerEffect, pointerShape: UIPointerShape) -> UIPointerStyle? {
|
||||
var buttonPointerStyle: UIPointerStyle? = nil
|
||||
|
||||
// Use the pointer effect's preview that's passed in.
|
||||
let targetedPreview = pointerEffect.preview
|
||||
|
||||
/** Pointer retains the system shape while over the given view.
|
||||
Visual changes applied to the view are dictated by the effect's properties.
|
||||
*/
|
||||
let buttonHoverPointerEffect =
|
||||
UIPointerEffect.hover(targetedPreview, preferredTintMode: .none, prefersShadow: true)
|
||||
buttonPointerStyle = UIPointerStyle(effect: buttonHoverPointerEffect, shape: nil)
|
||||
|
||||
return buttonPointerStyle
|
||||
}
|
||||
|
||||
func customButtonProvider(button: UIButton, pointerEffect: UIPointerEffect, pointerShape: UIPointerShape) -> UIPointerStyle? {
|
||||
var buttonPointerStyle: UIPointerStyle? = nil
|
||||
|
||||
/** Hover pointer with a custom triangle pointer shape.
|
||||
Override the default UITargetedPreview with our own, make the visible path outset a little larger.
|
||||
*/
|
||||
let parameters = UIPreviewParameters()
|
||||
parameters.visiblePath = UIBezierPath(rect: button.bounds.insetBy(dx: -15.0, dy: -15.0))
|
||||
let newTargetedPreview = UITargetedPreview(view: button, parameters: parameters)
|
||||
|
||||
let buttonPointerEffect =
|
||||
UIPointerEffect.hover(newTargetedPreview, preferredTintMode: .overlay, prefersShadow: false, prefersScaledContent: false)
|
||||
|
||||
let customPointerShape = UIPointerShape.path(trianglePointerShape())
|
||||
buttonPointerStyle = UIPointerStyle(effect: buttonPointerEffect, shape: customPointerShape)
|
||||
|
||||
return buttonPointerStyle
|
||||
}
|
||||
|
||||
// Return a triangle bezier path for the pointer's shape.
|
||||
func trianglePointerShape() -> UIBezierPath {
|
||||
let width = 20.0
|
||||
let height = 20.0
|
||||
let offset = 10.0 // Coordinate location to match up with the coordinate of default pointer shape.
|
||||
|
||||
let pathView = UIBezierPath()
|
||||
pathView.move(to: CGPoint(x: (width / 2) - offset, y: -offset))
|
||||
pathView.addLine(to: CGPoint(x: -offset, y: height - offset))
|
||||
pathView.addLine(to: CGPoint(x: width - offset, y: height - offset))
|
||||
pathView.close()
|
||||
|
||||
return pathView
|
||||
}
|
||||
}
|
||||
|
|
@ -7,26 +7,25 @@ A view controller that demonstrates how to use `UIProgressView`.
|
|||
|
||||
import UIKit
|
||||
|
||||
class ProgressViewController: UITableViewController {
|
||||
class ProgressViewController: BaseTableViewController {
|
||||
// Cell identifier for each progress view table view cell.
|
||||
enum ProgressViewKind: String, CaseIterable {
|
||||
case defaultProgress
|
||||
case barProgress
|
||||
case tintedProgress
|
||||
}
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
@IBOutlet weak var defaultStyleProgressView: UIProgressView!
|
||||
var observer: NSKeyValueObservation?
|
||||
|
||||
@IBOutlet weak var barStyleProgressView: UIProgressView!
|
||||
|
||||
@IBOutlet weak var tintedProgressView: UIProgressView!
|
||||
|
||||
@IBOutlet var progressViews: [UIProgressView]!
|
||||
|
||||
var observer: NSKeyValueObservation?
|
||||
|
||||
/** An `NSProgress` object who's `fractionCompleted` is observed using KVO to update
|
||||
the `UIProgressView`s' `progress` properties.
|
||||
*/
|
||||
let progress = Progress(totalUnitCount: 10)
|
||||
// An `NSProgress` object whose `fractionCompleted` is observed using KVO to update the `UIProgressView`s' `progress` properties.
|
||||
let progress = Progress(totalUnitCount: 10)
|
||||
|
||||
// A repeating timer that, when fired, updates the `NSProgress` object's `completedUnitCount` property.
|
||||
var updateTimer: Timer?
|
||||
var updateTimer: Timer?
|
||||
|
||||
var progressViews = [UIProgressView]() // Accumulated progress views from all table cells for progress updating.
|
||||
|
||||
// MARK: - Initialization
|
||||
|
||||
|
|
@ -34,37 +33,46 @@ class ProgressViewController: UITableViewController {
|
|||
super.init(coder: aDecoder)
|
||||
|
||||
// Register as an observer of the `NSProgress`'s `fractionCompleted` property.
|
||||
observer = progress.observe(\.fractionCompleted, options: [.new]) { (_, _) in
|
||||
// Update the progress views.
|
||||
for progressView in self.progressViews {
|
||||
observer = progress.observe(\.fractionCompleted, options: [.new]) { (_, _) in
|
||||
// Update the progress views.
|
||||
for progressView in self.progressViews {
|
||||
progressView.setProgress(Float(self.progress.fractionCompleted), animated: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
deinit {
|
||||
// Unregister as an observer of the `NSProgress`'s `fractionCompleted` property.
|
||||
observer?.invalidate()
|
||||
}
|
||||
|
||||
// MARK: - View Life Cycle
|
||||
|
||||
// MARK: - View Life Cycle
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
configureDefaultStyleProgressView()
|
||||
configureBarStyleProgressView()
|
||||
configureTintedProgressView()
|
||||
testCells.append(contentsOf: [
|
||||
CaseElement(title: NSLocalizedString("ProgressDefaultTitle", comment: ""),
|
||||
cellID: ProgressViewKind.defaultProgress.rawValue,
|
||||
configHandler: configureDefaultStyleProgressView),
|
||||
CaseElement(title: NSLocalizedString("ProgressBarTitle", comment: ""),
|
||||
cellID: ProgressViewKind.barProgress.rawValue,
|
||||
configHandler: configureBarStyleProgressView)
|
||||
])
|
||||
|
||||
if traitCollection.userInterfaceIdiom != .mac {
|
||||
// Tinted progress views available only on iOS.
|
||||
testCells.append(contentsOf: [
|
||||
CaseElement(title: NSLocalizedString("ProgressTintedTitle", comment: ""),
|
||||
cellID: ProgressViewKind.tintedProgress.rawValue,
|
||||
configHandler: configureTintedProgressView)
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
override func viewDidAppear(_ animated: Bool) {
|
||||
super.viewDidAppear(animated)
|
||||
|
||||
// Reset the completed progress of the `UIProgressView`s.
|
||||
for progressView in progressViews {
|
||||
progressView.setProgress(0.0, animated: false)
|
||||
}
|
||||
|
||||
|
||||
/** Reset the `completedUnitCount` of the `NSProgress` object and create
|
||||
a repeating timer to increment it over time.
|
||||
*/
|
||||
|
|
@ -91,50 +99,34 @@ class ProgressViewController: UITableViewController {
|
|||
|
||||
// MARK: - Configuration
|
||||
|
||||
func configureDefaultStyleProgressView() {
|
||||
defaultStyleProgressView.progressViewStyle = .default
|
||||
func configureDefaultStyleProgressView(_ progressView: UIProgressView) {
|
||||
progressView.progressViewStyle = .default
|
||||
|
||||
// Reset the completed progress of the `UIProgressView`s.
|
||||
progressView.setProgress(0.0, animated: false)
|
||||
|
||||
progressViews.append(progressView)
|
||||
}
|
||||
|
||||
func configureBarStyleProgressView() {
|
||||
barStyleProgressView.progressViewStyle = .bar
|
||||
func configureBarStyleProgressView(_ progressView: UIProgressView) {
|
||||
progressView.progressViewStyle = .bar
|
||||
|
||||
// Reset the completed progress of the `UIProgressView`s.
|
||||
progressView.setProgress(0.0, animated: false)
|
||||
|
||||
progressViews.append(progressView)
|
||||
}
|
||||
|
||||
func configureTintedProgressView() {
|
||||
tintedProgressView.progressViewStyle = .default
|
||||
func configureTintedProgressView(_ progressView: UIProgressView) {
|
||||
progressView.progressViewStyle = .default
|
||||
|
||||
tintedProgressView.trackTintColor = UIColor.systemBlue
|
||||
tintedProgressView.progressTintColor = UIColor.systemPurple
|
||||
progressView.trackTintColor = UIColor.systemBlue
|
||||
progressView.progressTintColor = UIColor.systemPurple
|
||||
|
||||
// Reset the completed progress of the `UIProgressView`s.
|
||||
progressView.setProgress(0.0, animated: false)
|
||||
|
||||
progressViews.append(progressView)
|
||||
}
|
||||
|
||||
// MARK: - UITableViewDataSource
|
||||
|
||||
override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
|
||||
#if targetEnvironment(macCatalyst)
|
||||
// Don't show tinted progress view for macOS, it does not exist.
|
||||
if section == 2 {
|
||||
return ""
|
||||
} else {
|
||||
return super.tableView(tableView, titleForHeaderInSection: section)
|
||||
}
|
||||
#else
|
||||
return super.tableView(tableView, titleForHeaderInSection: section)
|
||||
#endif
|
||||
}
|
||||
|
||||
// MARK: - UITableViewDelegate
|
||||
|
||||
override func tableView(_ tableView: UITableView,
|
||||
heightForRowAt indexPath: IndexPath) -> CGFloat {
|
||||
#if targetEnvironment(macCatalyst)
|
||||
// Don't show tinted progress view for macOS, it does not exist.
|
||||
if indexPath.section == 2 {
|
||||
return 0
|
||||
} else {
|
||||
return super.tableView(tableView, heightForRowAt: indexPath)
|
||||
}
|
||||
#else
|
||||
return super.tableView(tableView, heightForRowAt: indexPath)
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,81 +10,79 @@ import UIKit
|
|||
class SceneDelegate: UIResponder, UIWindowSceneDelegate, UISplitViewControllerDelegate {
|
||||
var window: UIWindow?
|
||||
|
||||
/** Applications should configure their UIWindow, and attach the UIWindow to the provided UIWindowScene scene.
|
||||
/** Applications configure their UIWindow and attach the UIWindow to the provided UIWindowScene scene.
|
||||
|
||||
Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
|
||||
|
||||
If using a storyboard file (as specified by the Info.plist key, UISceneStoryboardFile,
|
||||
the window property will automatically be configured and attached to the windowScene.
|
||||
If using a storyboard file, as specified by the Info.plist key `UISceneStoryboardFile`,
|
||||
the window property automatically configures and attaches to the windowScene.
|
||||
|
||||
Remember to retain the SceneDelegate 's UIWindow.
|
||||
Remember to retain the SceneDelegate's UIWindow.
|
||||
The recommended approach is for the SceneDelegate to retain the scene's window.
|
||||
*/
|
||||
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
|
||||
guard let windowScene = (scene as? UIWindowScene) else { return }
|
||||
guard (scene as? UIWindowScene) != nil else { return }
|
||||
|
||||
if let splitViewController = window!.rootViewController as? UISplitViewController {
|
||||
splitViewController.delegate = self
|
||||
|
||||
splitViewController.preferredDisplayMode = .oneBesideSecondary
|
||||
splitViewController.presentsWithGesture = false
|
||||
|
||||
if let navController = splitViewController.viewControllers[1] as? UINavigationController {
|
||||
// For the Mac, remove the title bar and navigation bar.
|
||||
#if targetEnvironment(macCatalyst)
|
||||
if let titlebar = windowScene.titlebar {
|
||||
titlebar.titleVisibility = .hidden
|
||||
titlebar.toolbar = nil
|
||||
}
|
||||
// Hide the navigation bar on the Mac.
|
||||
// For the Mac, remove the navigation bar.
|
||||
if navController.traitCollection.userInterfaceIdiom == .mac {
|
||||
navController.navigationBar.isHidden = true
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Called as the scene is being released by the system or on window close.
|
||||
This occurs shortly after the scene enters the background, or when its session is discarded.
|
||||
Release any resources associated with this scene that can be re-created the next time the scene connects.
|
||||
The scene may re-connect later, as its session was not neccessarily discarded (see`application:didDiscardSceneSessions` instead).
|
||||
/** Called by iOS when the system is releasing the scene or on window close.
|
||||
This occurs shortly after the scene enters the background, or when discarding its session.
|
||||
Release any resources for this scene that you can create the next time the scene connects.
|
||||
The scene may reconnect later because the system doesn't necessarily discard its session
|
||||
(see `application:didDiscardSceneSessions` instead).
|
||||
*/
|
||||
func sceneDidDisconnect(_ scene: UIScene) {
|
||||
}
|
||||
|
||||
/** Called as the scene transitions from the background to the foreground,
|
||||
on window open or in iOS resume.
|
||||
Use this method to undo the changes made on entering the background.
|
||||
/** Called by iOS as the scene transitions from the background to the foreground, on window open, or on iOS resume.
|
||||
Use this method to undo the changes that occur on entering the background.
|
||||
*/
|
||||
func sceneWillEnterForeground(_ scene: UIScene) {
|
||||
}
|
||||
|
||||
/** Called as the scene transitions from the foreground to the background.
|
||||
/** Called by iOS as the scene transitions from the foreground to the background.
|
||||
Use this method to save data, release shared resources, and store enough scene-specific state information
|
||||
to restore the scene back to its current state.
|
||||
to restore the scene to its current state.
|
||||
*/
|
||||
func sceneDidEnterBackground(_ scene: UIScene) {
|
||||
}
|
||||
|
||||
/** Called when the scene "will move" from an active state to an inactive state,
|
||||
on window close or in iOS enter background.
|
||||
This may occur due to temporary interruptions (ex. an incoming phone call).
|
||||
/** Called by iOS when the scene is about to move from an active state to an inactive state, on window close or on iOS enter background.
|
||||
This may occur due to temporary interruptions (such as, an incoming phone call).
|
||||
*/
|
||||
func sceneWillResignActive(_ scene: UIScene) {
|
||||
}
|
||||
|
||||
/** Called when the scene "has moved" from an inactive state to an active state.
|
||||
Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
|
||||
Is called every time a scene becomes active, so setup your scene UI here.
|
||||
/** Called by iOS when the scene after the scene moves from an inactive state to an active state.
|
||||
Use this method to restart any paused tasks (or pending tasks) when the scene is inactive.
|
||||
This is called every time a scene becomes active, so set up your scene UI here.
|
||||
*/
|
||||
func sceneDidBecomeActive(_ scene: UIScene) {
|
||||
}
|
||||
|
||||
// MARK: - UISplitViewControllerDelegate
|
||||
|
||||
func splitViewController(_ splitViewController: UISplitViewController,
|
||||
collapseSecondary secondaryViewController: UIViewController,
|
||||
onto primaryViewController: UIViewController) -> Bool {
|
||||
// Return true to prevent UIKit from applying its default behavior.
|
||||
return true
|
||||
func splitViewController(_ svc: UISplitViewController,
|
||||
topColumnForCollapsingToProposedTopColumn proposedTopColumn: UISplitViewController.Column)
|
||||
-> UISplitViewController.Column {
|
||||
return .secondary
|
||||
}
|
||||
|
||||
func splitViewController(_ svc: UISplitViewController,
|
||||
displayModeForExpandingToProposedDisplayMode proposedDisplayMode: UISplitViewController.DisplayMode)
|
||||
-> UISplitViewController.DisplayMode {
|
||||
if let navController = svc.viewControllers[0] as? UINavigationController {
|
||||
navController.popToRootViewController(animated: false)
|
||||
}
|
||||
return .automatic
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,76 +7,117 @@ A view controller that demonstrates how to use `UISegmentedControl`.
|
|||
|
||||
import UIKit
|
||||
|
||||
class SegmentedControlViewController: UITableViewController {
|
||||
// MARK: - Properties
|
||||
|
||||
@IBOutlet weak var defaultSegmentedControl: UISegmentedControl!
|
||||
@IBOutlet weak var tintedSegmentedControl: UISegmentedControl!
|
||||
@IBOutlet weak var customSegmentsSegmentedControl: UISegmentedControl!
|
||||
@IBOutlet weak var customBackgroundSegmentedControl: UISegmentedControl!
|
||||
@IBOutlet weak var actionBasedSegmentedControl: UISegmentedControl!
|
||||
class SegmentedControlViewController: BaseTableViewController {
|
||||
|
||||
// Cell identifier for each segmented control table view cell.
|
||||
enum SegmentKind: String, CaseIterable {
|
||||
case segmentDefault
|
||||
case segmentTinted
|
||||
case segmentCustom
|
||||
case segmentCustomBackground
|
||||
case segmentAction
|
||||
}
|
||||
|
||||
// MARK: - View Life Cycle
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
configureDefaultSegmentedControl()
|
||||
configureTintedSegmentedControl()
|
||||
configureCustomSegmentsSegmentedControl()
|
||||
configureCustomBackgroundSegmentedControl()
|
||||
configureActionBasedSegmentedControl()
|
||||
testCells.append(contentsOf: [
|
||||
CaseElement(title: NSLocalizedString("DefaultTitle", comment: ""),
|
||||
cellID: SegmentKind.segmentDefault.rawValue,
|
||||
configHandler: configureDefaultSegmentedControl),
|
||||
CaseElement(title: NSLocalizedString("CustomSegmentsTitle", comment: ""),
|
||||
cellID: SegmentKind.segmentCustom.rawValue,
|
||||
configHandler: configureCustomSegmentsSegmentedControl),
|
||||
CaseElement(title: NSLocalizedString("CustomBackgroundTitle", comment: ""),
|
||||
cellID: SegmentKind.segmentCustomBackground.rawValue,
|
||||
configHandler: configureCustomBackgroundSegmentedControl),
|
||||
CaseElement(title: NSLocalizedString("ActionBasedTitle", comment: ""),
|
||||
cellID: SegmentKind.segmentAction.rawValue,
|
||||
configHandler: configureActionBasedSegmentedControl)
|
||||
])
|
||||
if self.traitCollection.userInterfaceIdiom != .mac {
|
||||
// Tinted segmented control is only available on iOS.
|
||||
testCells.append(contentsOf: [
|
||||
CaseElement(title: "Tinted",
|
||||
cellID: SegmentKind.segmentTinted.rawValue,
|
||||
configHandler: configureTintedSegmentedControl)
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Configuration
|
||||
|
||||
func configureDefaultSegmentedControl() {
|
||||
func configureDefaultSegmentedControl(_ segmentedControl: UISegmentedControl) {
|
||||
// As a demonstration, disable the first segment.
|
||||
defaultSegmentedControl.setEnabled(false, forSegmentAt: 0)
|
||||
segmentedControl.setEnabled(false, forSegmentAt: 0)
|
||||
|
||||
defaultSegmentedControl.addTarget(self, action: #selector(SegmentedControlViewController.selectedSegmentDidChange(_:)), for: .valueChanged)
|
||||
segmentedControl.addTarget(self, action: #selector(SegmentedControlViewController.selectedSegmentDidChange(_:)), for: .valueChanged)
|
||||
}
|
||||
|
||||
func configureTintedSegmentedControl() {
|
||||
// Use a dynamic tinted color (separate one for Light Appearance and separate one for Dark Appearance).
|
||||
tintedSegmentedControl.selectedSegmentTintColor = UIColor(named: "tinted_segmented_control")!
|
||||
func configureTintedSegmentedControl(_ segmentedControl: UISegmentedControl) {
|
||||
// Use a dynamic tinted "green" color (separate one for Light Appearance and separate one for Dark Appearance).
|
||||
segmentedControl.selectedSegmentTintColor = UIColor(named: "tinted_segmented_control")!
|
||||
segmentedControl.selectedSegmentIndex = 1
|
||||
|
||||
tintedSegmentedControl.selectedSegmentIndex = 1
|
||||
|
||||
tintedSegmentedControl.addTarget(self, action: #selector(SegmentedControlViewController.selectedSegmentDidChange(_:)), for: .valueChanged)
|
||||
segmentedControl.addTarget(self, action: #selector(SegmentedControlViewController.selectedSegmentDidChange(_:)), for: .valueChanged)
|
||||
}
|
||||
|
||||
func configureCustomSegmentsSegmentedControl() {
|
||||
func configureCustomSegmentsSegmentedControl(_ segmentedControl: UISegmentedControl) {
|
||||
let airplaneImage = UIImage(systemName: "airplane")
|
||||
airplaneImage?.accessibilityLabel = NSLocalizedString("Airplane", comment: "")
|
||||
customSegmentsSegmentedControl.setImage(airplaneImage, forSegmentAt: 0)
|
||||
segmentedControl.setImage(airplaneImage, forSegmentAt: 0)
|
||||
|
||||
let giftImage = UIImage(systemName: "gift")
|
||||
giftImage?.accessibilityLabel = NSLocalizedString("Gift", comment: "")
|
||||
customSegmentsSegmentedControl.setImage(giftImage, forSegmentAt: 1)
|
||||
segmentedControl.setImage(giftImage, forSegmentAt: 1)
|
||||
|
||||
let burstImage = UIImage(systemName: "burst")
|
||||
burstImage?.accessibilityLabel = NSLocalizedString("Burst", comment: "")
|
||||
customSegmentsSegmentedControl.setImage(burstImage, forSegmentAt: 2)
|
||||
segmentedControl.setImage(burstImage, forSegmentAt: 2)
|
||||
|
||||
customSegmentsSegmentedControl.selectedSegmentIndex = 0
|
||||
segmentedControl.selectedSegmentIndex = 0
|
||||
|
||||
customSegmentsSegmentedControl.addTarget(self,
|
||||
action: #selector(SegmentedControlViewController.selectedSegmentDidChange(_:)),
|
||||
for: .valueChanged)
|
||||
segmentedControl.addTarget(self, action: #selector(SegmentedControlViewController.selectedSegmentDidChange(_:)), for: .valueChanged)
|
||||
}
|
||||
|
||||
func configureCustomBackgroundSegmentedControl() {
|
||||
// Utility function to resize an image to a particular size.
|
||||
func scaledImage(_ image: UIImage, scaledToSize newSize: CGSize) -> UIImage {
|
||||
UIGraphicsBeginImageContextWithOptions(newSize, false, 0.0)
|
||||
image.draw(in: CGRect(x: 0, y: 0, width: newSize.width, height: newSize.height))
|
||||
let newImage = UIGraphicsGetImageFromCurrentImageContext()!
|
||||
UIGraphicsEndImageContext()
|
||||
return newImage
|
||||
}
|
||||
|
||||
// Configure the segmented control with a background image, dividers, and custom font.
|
||||
// The background image first needs to be sized to match the control's size.
|
||||
//
|
||||
func configureCustomBackgroundSegmentedControl(_ placeHolderView: UIView) {
|
||||
let customBackgroundSegmentedControl =
|
||||
UISegmentedControl(items: [NSLocalizedString("CheckTitle", comment: ""),
|
||||
NSLocalizedString("SearchTitle", comment: ""),
|
||||
NSLocalizedString("ToolsTitle", comment: "")])
|
||||
customBackgroundSegmentedControl.selectedSegmentIndex = 2
|
||||
|
||||
|
||||
// Place this custom segmented control within the placeholder view.
|
||||
customBackgroundSegmentedControl.frame.size.width = placeHolderView.frame.size.width
|
||||
customBackgroundSegmentedControl.frame.origin.y =
|
||||
(placeHolderView.bounds.size.height - customBackgroundSegmentedControl.bounds.size.height) / 2
|
||||
placeHolderView.addSubview(customBackgroundSegmentedControl)
|
||||
|
||||
// Set the background images for each control state.
|
||||
let normalSegmentBackgroundImage = UIImage(named: "stepper_and_segment_background")
|
||||
customBackgroundSegmentedControl.setBackgroundImage(normalSegmentBackgroundImage, for: .normal, barMetrics: .default)
|
||||
|
||||
let disabledSegmentBackgroundImage = UIImage(named: "stepper_and_segment_background_disabled")
|
||||
let normalSegmentBackgroundImage = UIImage(named: "background")
|
||||
// Size the background image to match the bounds of the segmented control.
|
||||
let backgroundImageSize = customBackgroundSegmentedControl.bounds.size
|
||||
let newBackgroundImageSize = scaledImage(normalSegmentBackgroundImage!, scaledToSize: backgroundImageSize)
|
||||
customBackgroundSegmentedControl.setBackgroundImage(newBackgroundImageSize, for: .normal, barMetrics: .default)
|
||||
|
||||
let disabledSegmentBackgroundImage = UIImage(named: "background_disabled")
|
||||
customBackgroundSegmentedControl.setBackgroundImage(disabledSegmentBackgroundImage, for: .disabled, barMetrics: .default)
|
||||
|
||||
let highlightedSegmentBackgroundImage = UIImage(named: "stepper_and_segment_background_highlighted")
|
||||
let highlightedSegmentBackgroundImage = UIImage(named: "background_highlighted")
|
||||
customBackgroundSegmentedControl.setBackgroundImage(highlightedSegmentBackgroundImage, for: .highlighted, barMetrics: .default)
|
||||
|
||||
// Set the divider image.
|
||||
|
|
@ -87,9 +128,7 @@ class SegmentedControlViewController: UITableViewController {
|
|||
barMetrics: .default)
|
||||
|
||||
// Create a font to use for the attributed title, for both normal and highlighted states.
|
||||
let captionFontDescriptor = UIFontDescriptor.preferredFontDescriptor(withTextStyle: .caption1)
|
||||
let font = UIFont(descriptor: captionFontDescriptor, size: 0)
|
||||
|
||||
let font = UIFont(descriptor: UIFontDescriptor.preferredFontDescriptor(withTextStyle: .body), size: 0)
|
||||
let normalTextAttributes = [
|
||||
NSAttributedString.Key.foregroundColor: UIColor.systemPurple,
|
||||
NSAttributedString.Key.font: font
|
||||
|
|
@ -107,60 +146,44 @@ class SegmentedControlViewController: UITableViewController {
|
|||
for: .valueChanged)
|
||||
}
|
||||
|
||||
func configureActionBasedSegmentedControl() {
|
||||
actionBasedSegmentedControl.selectedSegmentIndex = 0
|
||||
func configureActionBasedSegmentedControl(_ segmentedControl: UISegmentedControl) {
|
||||
segmentedControl.selectedSegmentIndex = 0
|
||||
let firstAction =
|
||||
UIAction(title: NSLocalizedString("CheckTitle", comment: "")) { action in
|
||||
Swift.debugPrint("Segment Action '\(action.title)'")
|
||||
}
|
||||
actionBasedSegmentedControl.setAction(firstAction, forSegmentAt: 0)
|
||||
segmentedControl.setAction(firstAction, forSegmentAt: 0)
|
||||
let secondAction =
|
||||
UIAction(title: NSLocalizedString("SearchTitle", comment: "")) { action in
|
||||
Swift.debugPrint("Segment Action '\(action.title)'")
|
||||
}
|
||||
actionBasedSegmentedControl.setAction(secondAction, forSegmentAt: 1)
|
||||
segmentedControl.setAction(secondAction, forSegmentAt: 1)
|
||||
let thirdAction =
|
||||
UIAction(title: NSLocalizedString("ToolsTitle", comment: "")) { action in
|
||||
Swift.debugPrint("Segment Action '\(action.title)'")
|
||||
}
|
||||
actionBasedSegmentedControl.setAction(thirdAction, forSegmentAt: 2)
|
||||
segmentedControl.setAction(thirdAction, forSegmentAt: 2)
|
||||
}
|
||||
|
||||
|
||||
// MARK: - Actions
|
||||
|
||||
@objc
|
||||
func selectedSegmentDidChange(_ segmentedControl: UISegmentedControl) {
|
||||
print("The selected segment changed for: \(segmentedControl).")
|
||||
Swift.debugPrint("The selected segment: \(segmentedControl.selectedSegmentIndex).")
|
||||
}
|
||||
|
||||
// MARK: - UITableViewDataSource
|
||||
|
||||
override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
|
||||
#if targetEnvironment(macCatalyst)
|
||||
// Don't show tinted segmented control for macOS, it does not exist.
|
||||
if section == 1 {
|
||||
return ""
|
||||
} else {
|
||||
return super.tableView(tableView, titleForHeaderInSection: section)
|
||||
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||
let cellTest = testCells[indexPath.section]
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: cellTest.cellID, for: indexPath)
|
||||
if let segementedControl = cellTest.targetView(cell) as? UISegmentedControl {
|
||||
cellTest.configHandler(segementedControl)
|
||||
} else if let placeHolderView = cellTest.targetView(cell) {
|
||||
// The only non-segmented control cell has a placeholder UIView (for adding one as a subview).
|
||||
cellTest.configHandler(placeHolderView)
|
||||
}
|
||||
#else
|
||||
return super.tableView(tableView, titleForHeaderInSection: section)
|
||||
#endif
|
||||
}
|
||||
|
||||
// MARK: - UITableViewDelegate
|
||||
|
||||
override func tableView(_ tableView: UITableView,
|
||||
heightForRowAt indexPath: IndexPath) -> CGFloat {
|
||||
#if targetEnvironment(macCatalyst)
|
||||
// Don't show tinted segmented control for macOS, it does not exist.
|
||||
if indexPath.section == 1 {
|
||||
return 0
|
||||
} else {
|
||||
return super.tableView(tableView, heightForRowAt: indexPath)
|
||||
}
|
||||
#else
|
||||
return super.tableView(tableView, heightForRowAt: indexPath)
|
||||
#endif
|
||||
return cell
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,98 +7,139 @@ A view controller that demonstrates how to use `UISlider`.
|
|||
|
||||
import UIKit
|
||||
|
||||
class SliderViewController: UITableViewController {
|
||||
// MARK: - Properties
|
||||
class SliderViewController: BaseTableViewController {
|
||||
// Cell identifier for each slider table view cell.
|
||||
enum SliderKind: String, CaseIterable {
|
||||
case sliderDefault
|
||||
case sliderTinted
|
||||
case sliderCustom
|
||||
case sliderMaxMinImage
|
||||
}
|
||||
|
||||
@IBOutlet weak var defaultSlider: UISlider!
|
||||
@IBOutlet weak var tintedSlider: UISlider!
|
||||
@IBOutlet weak var customSlider: UISlider!
|
||||
@IBOutlet weak var minMaxImageSlider: UISlider!
|
||||
|
||||
// MARK: - View Life Cycle
|
||||
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
configureDefaultSlider()
|
||||
#if !targetEnvironment(macCatalyst)
|
||||
/** Only show for the first table cell (default slider).
|
||||
Because this sample has "Optimize Interface for Mac" turned on -
|
||||
UISlider class: tinted, custom, and max/min image, are not supported when running Mac Catalyst apps in the Mac idiom.
|
||||
*/
|
||||
configureTintedSlider()
|
||||
configureCustomSlider()
|
||||
configureMinMaxImageSlider()
|
||||
#endif
|
||||
testCells.append(contentsOf: [
|
||||
CaseElement(title: NSLocalizedString("DefaultTitle", comment: ""),
|
||||
cellID: SliderKind.sliderDefault.rawValue,
|
||||
configHandler: configureDefaultSlider)
|
||||
])
|
||||
|
||||
if #available(iOS 15, *) {
|
||||
// These cases require iOS 15 or later when running on Mac Catalyst.
|
||||
testCells.append(contentsOf: [
|
||||
CaseElement(title: NSLocalizedString("CustomTitle", comment: ""),
|
||||
cellID: SliderKind.sliderCustom.rawValue,
|
||||
configHandler: configureCustomSlider)
|
||||
])
|
||||
testCells.append(contentsOf: [
|
||||
CaseElement(title: NSLocalizedString("MinMaxImagesTitle", comment: ""),
|
||||
cellID: SliderKind.sliderMaxMinImage.rawValue,
|
||||
configHandler: configureMinMaxImageSlider)
|
||||
])
|
||||
testCells.append(contentsOf: [
|
||||
CaseElement(title: NSLocalizedString("TintedTitle", comment: ""),
|
||||
cellID: SliderKind.sliderTinted.rawValue,
|
||||
configHandler: configureTintedSlider)
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Configuration
|
||||
|
||||
override func numberOfSections(in tableView: UITableView) -> Int {
|
||||
#if targetEnvironment(macCatalyst)
|
||||
/** Only show for the first table cell (default slider).
|
||||
Because this sample has "Optimize Interface for Mac" turned on -
|
||||
UISlider class: tinted, custom, and max/min image, are not supported when running Mac Catalyst apps in the Mac idiom.
|
||||
|
||||
func configureDefaultSlider(_ slider: UISlider) {
|
||||
slider.minimumValue = 0
|
||||
slider.maximumValue = 100
|
||||
slider.value = 42
|
||||
slider.isContinuous = true
|
||||
|
||||
slider.addTarget(self, action: #selector(SliderViewController.sliderValueDidChange(_:)), for: .valueChanged)
|
||||
}
|
||||
|
||||
@available(iOS 15.0, *)
|
||||
func configureTintedSlider(slider: UISlider) {
|
||||
/** To keep the look the same betwen iOS and macOS:
|
||||
For minimumTrackTintColor, maximumTrackTintColor to work in Mac Catalyst, use UIBehavioralStyle as ".pad",
|
||||
Available in macOS 12 or later (Mac Catalyst 15.0 or later).
|
||||
Use this for controls that need to look the same between iOS and macOS.
|
||||
*/
|
||||
return 1
|
||||
#else
|
||||
return super.numberOfSections(in: tableView)
|
||||
#endif
|
||||
}
|
||||
|
||||
func configureDefaultSlider() {
|
||||
defaultSlider.minimumValue = 0
|
||||
defaultSlider.maximumValue = 100
|
||||
defaultSlider.value = 42
|
||||
defaultSlider.isContinuous = true
|
||||
if traitCollection.userInterfaceIdiom == .mac {
|
||||
slider.preferredBehavioralStyle = .pad
|
||||
}
|
||||
|
||||
defaultSlider.addTarget(self,
|
||||
action: #selector(SliderViewController.sliderValueDidChange(_:)),
|
||||
for: .valueChanged)
|
||||
slider.minimumTrackTintColor = UIColor.systemBlue
|
||||
slider.maximumTrackTintColor = UIColor.systemPurple
|
||||
|
||||
slider.addTarget(self, action: #selector(SliderViewController.sliderValueDidChange(_:)), for: .valueChanged)
|
||||
}
|
||||
|
||||
func configureTintedSlider() {
|
||||
tintedSlider.minimumTrackTintColor = UIColor.systemBlue
|
||||
tintedSlider.maximumTrackTintColor = UIColor.systemPurple
|
||||
|
||||
tintedSlider.addTarget(self,
|
||||
action: #selector(SliderViewController.sliderValueDidChange(_:)),
|
||||
for: .valueChanged)
|
||||
}
|
||||
|
||||
func configureCustomSlider() {
|
||||
@available(iOS 15.0, *)
|
||||
func configureCustomSlider(slider: UISlider) {
|
||||
/** To keep the look the same betwen iOS and macOS:
|
||||
For setMinimumTrackImage, setMaximumTrackImage, setThumbImage to work in Mac Catalyst, use UIBehavioralStyle as ".pad",
|
||||
Available in macOS 12 or later (Mac Catalyst 15.0 or later).
|
||||
Use this for controls that need to look the same between iOS and macOS.
|
||||
*/
|
||||
if traitCollection.userInterfaceIdiom == .mac {
|
||||
slider.preferredBehavioralStyle = .pad
|
||||
}
|
||||
|
||||
let leftTrackImage = UIImage(named: "slider_blue_track")
|
||||
customSlider.setMinimumTrackImage(leftTrackImage, for: .normal)
|
||||
slider.setMinimumTrackImage(leftTrackImage, for: .normal)
|
||||
|
||||
let rightTrackImage = UIImage(named: "slider_green_track")
|
||||
customSlider.setMaximumTrackImage(rightTrackImage, for: .normal)
|
||||
slider.setMaximumTrackImage(rightTrackImage, for: .normal)
|
||||
|
||||
// Set the sliding thumb image (normal and highlighted).
|
||||
let thumbImageConfig = UIImage.SymbolConfiguration(scale: .large)
|
||||
//
|
||||
// For fun, choose a different image symbol configuraton for the thumb's image between macOS and iOS.
|
||||
var thumbImageConfig: UIImage.SymbolConfiguration
|
||||
if slider.traitCollection.userInterfaceIdiom == .mac {
|
||||
thumbImageConfig = UIImage.SymbolConfiguration(scale: .large)
|
||||
} else {
|
||||
thumbImageConfig = UIImage.SymbolConfiguration(pointSize: 30, weight: .heavy, scale: .large)
|
||||
}
|
||||
let thumbImage = UIImage(systemName: "circle.fill", withConfiguration: thumbImageConfig)
|
||||
customSlider.setThumbImage(thumbImage, for: .normal)
|
||||
slider.setThumbImage(thumbImage, for: .normal)
|
||||
|
||||
let thumbImageHighlighted = UIImage(systemName: "circle", withConfiguration: thumbImageConfig)
|
||||
customSlider.setThumbImage(thumbImageHighlighted, for: .highlighted)
|
||||
slider.setThumbImage(thumbImageHighlighted, for: .highlighted)
|
||||
|
||||
customSlider.minimumValue = 0
|
||||
customSlider.maximumValue = 100
|
||||
customSlider.isContinuous = false
|
||||
customSlider.value = 84
|
||||
// Set the rest of the slider's attributes.
|
||||
slider.minimumValue = 0
|
||||
slider.maximumValue = 100
|
||||
slider.isContinuous = false
|
||||
slider.value = 84
|
||||
|
||||
customSlider.addTarget(self, action: #selector(SliderViewController.sliderValueDidChange(_:)), for: .valueChanged)
|
||||
slider.addTarget(self, action: #selector(SliderViewController.sliderValueDidChange(_:)), for: .valueChanged)
|
||||
}
|
||||
|
||||
func configureMinMaxImageSlider() {
|
||||
minMaxImageSlider.minimumValueImage = UIImage(systemName: "tortoise")
|
||||
minMaxImageSlider.maximumValueImage = UIImage(systemName: "hare")
|
||||
func configureMinMaxImageSlider(slider: UISlider) {
|
||||
/** To keep the look the same betwen iOS and macOS:
|
||||
For setMinimumValueImage, setMaximumValueImage to work in Mac Catalyst, use UIBehavioralStyle as ".pad",
|
||||
Available in macOS 12 or later (Mac Catalyst 15.0 or later).
|
||||
Use this for controls that need to look the same between iOS and macOS.
|
||||
*/
|
||||
if #available(iOS 15, *) {
|
||||
if traitCollection.userInterfaceIdiom == .mac {
|
||||
slider.preferredBehavioralStyle = .pad
|
||||
}
|
||||
}
|
||||
|
||||
minMaxImageSlider.addTarget(self, action: #selector(SliderViewController.sliderValueDidChange(_:)), for: .valueChanged)
|
||||
slider.minimumValueImage = UIImage(systemName: "tortoise")
|
||||
slider.maximumValueImage = UIImage(systemName: "hare")
|
||||
|
||||
slider.addTarget(self, action: #selector(SliderViewController.sliderValueDidChange(_:)), for: .valueChanged)
|
||||
}
|
||||
|
||||
// MARK: - Actions
|
||||
|
||||
@objc
|
||||
func sliderValueDidChange(_ slider: UISlider) {
|
||||
print("A slider changed its value: \(slider).")
|
||||
let formattedValue = String(format: "%.2f", slider.value)
|
||||
Swift.debugPrint("Slider changed its value: \(formattedValue)")
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,13 +11,9 @@ class StackViewController: UIViewController {
|
|||
// MARK: - Properties
|
||||
|
||||
@IBOutlet var furtherDetailStackView: UIStackView!
|
||||
|
||||
@IBOutlet var plusButton: UIButton!
|
||||
|
||||
@IBOutlet var addRemoveExampleStackView: UIStackView!
|
||||
|
||||
@IBOutlet var addArrangedViewButton: UIButton!
|
||||
|
||||
@IBOutlet var removeArrangedViewButton: UIButton!
|
||||
|
||||
let maximumArrangedSubviewCount = 3
|
||||
|
|
|
|||
|
|
@ -7,106 +7,91 @@ A view controller that demonstrates how to use `UIStepper`.
|
|||
|
||||
import UIKit
|
||||
|
||||
class StepperViewController: UITableViewController {
|
||||
// MARK: - Properties
|
||||
|
||||
@IBOutlet weak var defaultStepper: UIStepper!
|
||||
|
||||
@IBOutlet weak var tintedStepper: UIStepper!
|
||||
class StepperViewController: BaseTableViewController {
|
||||
|
||||
@IBOutlet weak var customStepper: UIStepper!
|
||||
|
||||
@IBOutlet weak var defaultStepperLabel: UILabel!
|
||||
// Cell identifier for each stepper table view cell.
|
||||
enum StepperKind: String, CaseIterable {
|
||||
case defaultStepper
|
||||
case tintedStepper
|
||||
case customStepper
|
||||
}
|
||||
|
||||
@IBOutlet weak var tintedStepperLabel: UILabel!
|
||||
|
||||
@IBOutlet weak var customStepperLabel: UILabel!
|
||||
|
||||
// MARK: - View Life Cycle
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
configureDefaultStepper()
|
||||
configureTintedStepper()
|
||||
configureCustomStepper()
|
||||
testCells.append(contentsOf: [
|
||||
CaseElement(title: NSLocalizedString("DefaultStepperTitle", comment: ""),
|
||||
cellID: StepperKind.defaultStepper.rawValue,
|
||||
configHandler: configureDefaultStepper),
|
||||
CaseElement(title: NSLocalizedString("TintedStepperTitle", comment: ""),
|
||||
cellID: StepperKind.tintedStepper.rawValue,
|
||||
configHandler: configureTintedStepper),
|
||||
CaseElement(title: NSLocalizedString("CustomStepperTitle", comment: ""),
|
||||
cellID: StepperKind.customStepper.rawValue,
|
||||
configHandler: configureCustomStepper)
|
||||
])
|
||||
}
|
||||
|
||||
// MARK: - Configuration
|
||||
|
||||
override func numberOfSections(in tableView: UITableView) -> Int {
|
||||
#if targetEnvironment(macCatalyst)
|
||||
// Only show for the first table cell (default stepper).
|
||||
// Tinted and Custom steppers do not exist in macOS.
|
||||
return 1
|
||||
#else
|
||||
return super.numberOfSections(in: tableView)
|
||||
#endif
|
||||
}
|
||||
|
||||
func configureDefaultStepper() {
|
||||
defaultStepper.value = 0
|
||||
defaultStepper.minimumValue = 0
|
||||
defaultStepper.maximumValue = 10
|
||||
defaultStepper.stepValue = 1
|
||||
func configureDefaultStepper(stepper: UIStepper) {
|
||||
// Setup the stepper range 0 to 10, initial value 0, increment/decrement factor of 1.
|
||||
stepper.value = 0
|
||||
stepper.minimumValue = 0
|
||||
stepper.maximumValue = 10
|
||||
stepper.stepValue = 1
|
||||
|
||||
defaultStepperLabel.text = "\(Int(defaultStepper.value))"
|
||||
defaultStepper.addTarget(self,
|
||||
action: #selector(StepperViewController.stepperValueDidChange(_:)),
|
||||
for: .valueChanged)
|
||||
stepper.addTarget(self,
|
||||
action: #selector(StepperViewController.stepperValueDidChange(_:)),
|
||||
for: .valueChanged)
|
||||
}
|
||||
|
||||
func configureTintedStepper() {
|
||||
tintedStepper.tintColor = UIColor(named: "tinted_stepper_control")!
|
||||
tintedStepper.setDecrementImage(tintedStepper.decrementImage(for: .normal), for: .normal)
|
||||
tintedStepper.setIncrementImage(tintedStepper.incrementImage(for: .normal), for: .normal)
|
||||
func configureTintedStepper(stepper: UIStepper) {
|
||||
// Setup the stepper range 0 to 20, initial value 20, increment/decrement factor of 1.
|
||||
stepper.value = 20
|
||||
stepper.minimumValue = 0
|
||||
stepper.maximumValue = 20
|
||||
stepper.stepValue = 1
|
||||
|
||||
tintedStepperLabel.text = "\(Int(tintedStepper.value))"
|
||||
tintedStepper.addTarget(self,
|
||||
action: #selector(StepperViewController.stepperValueDidChange(_:)),
|
||||
for: .valueChanged)
|
||||
stepper.tintColor = UIColor(named: "tinted_stepper_control")!
|
||||
stepper.setDecrementImage(stepper.decrementImage(for: .normal), for: .normal)
|
||||
stepper.setIncrementImage(stepper.incrementImage(for: .normal), for: .normal)
|
||||
|
||||
stepper.addTarget(self,
|
||||
action: #selector(StepperViewController.stepperValueDidChange(_:)),
|
||||
for: .valueChanged)
|
||||
}
|
||||
|
||||
func configureCustomStepper() {
|
||||
func configureCustomStepper(stepper: UIStepper) {
|
||||
// Set the background image.
|
||||
let stepperBackgroundImage = UIImage(named: "stepper_and_segment_background")
|
||||
customStepper.setBackgroundImage(stepperBackgroundImage, for: .normal)
|
||||
let stepperBackgroundImage = UIImage(named: "background")
|
||||
stepper.setBackgroundImage(stepperBackgroundImage, for: .normal)
|
||||
|
||||
let stepperHighlightedBackgroundImage = UIImage(named: "stepper_and_segment_background_highlighted")
|
||||
customStepper.setBackgroundImage(stepperHighlightedBackgroundImage, for: .highlighted)
|
||||
let stepperHighlightedBackgroundImage = UIImage(named: "background_highlighted")
|
||||
stepper.setBackgroundImage(stepperHighlightedBackgroundImage, for: .highlighted)
|
||||
|
||||
let stepperDisabledBackgroundImage = UIImage(named: "stepper_and_segment_background_disabled")
|
||||
customStepper.setBackgroundImage(stepperDisabledBackgroundImage, for: .disabled)
|
||||
let stepperDisabledBackgroundImage = UIImage(named: "background_disabled")
|
||||
stepper.setBackgroundImage(stepperDisabledBackgroundImage, for: .disabled)
|
||||
|
||||
// Set the image which will be painted in between the two stepper segments. It depends on the states of both segments.
|
||||
let stepperSegmentDividerImage = UIImage(named: "stepper_and_segment_divider")
|
||||
customStepper.setDividerImage(stepperSegmentDividerImage, forLeftSegmentState: .normal, rightSegmentState: .normal)
|
||||
stepper.setDividerImage(stepperSegmentDividerImage, forLeftSegmentState: .normal, rightSegmentState: .normal)
|
||||
|
||||
// Set the image for the + button.
|
||||
let stepperIncrementImage = UIImage(named: "stepper_increment")
|
||||
customStepper.setIncrementImage(stepperIncrementImage, for: .normal)
|
||||
let stepperIncrementImage = UIImage(systemName: "plus")
|
||||
stepper.setIncrementImage(stepperIncrementImage, for: .normal)
|
||||
|
||||
// Set the image for the - button.
|
||||
let stepperDecrementImage = UIImage(named: "stepper_decrement")
|
||||
customStepper.setDecrementImage(stepperDecrementImage, for: .normal)
|
||||
let stepperDecrementImage = UIImage(systemName: "minus")
|
||||
stepper.setDecrementImage(stepperDecrementImage, for: .normal)
|
||||
|
||||
customStepperLabel.text = "\(Int(customStepper.value))"
|
||||
customStepper.addTarget(self, action: #selector(StepperViewController.stepperValueDidChange(_:)), for: .valueChanged)
|
||||
stepper.addTarget(self, action: #selector(StepperViewController.stepperValueDidChange(_:)), for: .valueChanged)
|
||||
}
|
||||
|
||||
// MARK: - Actions
|
||||
|
||||
@objc
|
||||
func stepperValueDidChange(_ stepper: UIStepper) {
|
||||
print("A stepper changed its value: \(stepper).")
|
||||
|
||||
// A mapping from a stepper to its associated label.
|
||||
let stepperMapping = [
|
||||
defaultStepper: defaultStepperLabel,
|
||||
tintedStepper: tintedStepperLabel,
|
||||
customStepper: customStepperLabel
|
||||
]
|
||||
|
||||
stepperMapping[stepper]!?.text = "\(Int(stepper.value))"
|
||||
Swift.debugPrint("A stepper changed its value: \(stepper.value).")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,106 +7,85 @@ A view controller that demonstrates how to use `UISwitch`.
|
|||
|
||||
import UIKit
|
||||
|
||||
class SwitchViewController: UITableViewController {
|
||||
// MARK: - Properties
|
||||
class SwitchViewController: BaseTableViewController {
|
||||
|
||||
@IBOutlet weak var defaultSwitch: UISwitch!
|
||||
@IBOutlet weak var checkBoxSwitch: UISwitch!
|
||||
@IBOutlet weak var tintedSwitch: UISwitch!
|
||||
|
||||
// MARK: - View Life Cycle
|
||||
// Cell identifier for each switch table view cell.
|
||||
enum SwitchKind: String, CaseIterable {
|
||||
case defaultSwitch
|
||||
case checkBoxSwitch
|
||||
case tintedSwitch
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
configureDefaultSwitch()
|
||||
configureCheckboxSwitch() // macOS only.
|
||||
configureTintedSwitch() // iOS only.
|
||||
testCells.append(contentsOf: [
|
||||
CaseElement(title: NSLocalizedString("DefaultSwitchTitle", comment: ""),
|
||||
cellID: SwitchKind.defaultSwitch.rawValue,
|
||||
configHandler: configureDefaultSwitch)
|
||||
])
|
||||
|
||||
// Checkbox switch is available only when running on macOS.
|
||||
if navigationController!.traitCollection.userInterfaceIdiom == .mac {
|
||||
testCells.append(contentsOf: [
|
||||
CaseElement(title: NSLocalizedString("CheckboxSwitchTitle", comment: ""),
|
||||
cellID: SwitchKind.checkBoxSwitch.rawValue,
|
||||
configHandler: configureCheckboxSwitch)
|
||||
])
|
||||
}
|
||||
|
||||
// Tinted switch is available only when running on iOS.
|
||||
if navigationController!.traitCollection.userInterfaceIdiom != .mac {
|
||||
testCells.append(contentsOf: [
|
||||
CaseElement(title: NSLocalizedString("TintedSwitchTitle", comment: ""),
|
||||
cellID: SwitchKind.tintedSwitch.rawValue,
|
||||
configHandler: configureTintedSwitch)
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Configuration
|
||||
|
||||
func configureDefaultSwitch() {
|
||||
defaultSwitch.setOn(true, animated: false)
|
||||
defaultSwitch.preferredStyle = .sliding
|
||||
func configureDefaultSwitch(_ switchControl: UISwitch) {
|
||||
switchControl.setOn(true, animated: false)
|
||||
switchControl.preferredStyle = .sliding
|
||||
|
||||
defaultSwitch.addTarget(self, action: #selector(SwitchViewController.switchValueDidChange(_:)), for: .valueChanged)
|
||||
switchControl.addTarget(self,
|
||||
action: #selector(SwitchViewController.switchValueDidChange(_:)),
|
||||
for: .valueChanged)
|
||||
}
|
||||
|
||||
func configureCheckboxSwitch() {
|
||||
checkBoxSwitch.setOn(true, animated: false)
|
||||
func configureCheckboxSwitch(_ switchControl: UISwitch) {
|
||||
switchControl.setOn(true, animated: false)
|
||||
|
||||
checkBoxSwitch.addTarget(self, action: #selector(SwitchViewController.switchValueDidChange(_:)), for: .valueChanged)
|
||||
switchControl.addTarget(self,
|
||||
action: #selector(SwitchViewController.switchValueDidChange(_:)),
|
||||
for: .valueChanged)
|
||||
|
||||
// On the Mac, make sure this control take on the apperance of a checkbox with a title.
|
||||
if traitCollection.userInterfaceIdiom == .mac {
|
||||
checkBoxSwitch.preferredStyle = .checkbox
|
||||
switchControl.preferredStyle = .checkbox
|
||||
|
||||
// Title on a UISwitch is only supported when running Catalyst apps in the Mac Idiom.
|
||||
checkBoxSwitch.title = NSLocalizedString("SwitchTitle", comment: "")
|
||||
switchControl.title = NSLocalizedString("SwitchTitle", comment: "")
|
||||
}
|
||||
}
|
||||
|
||||
func configureTintedSwitch() {
|
||||
tintedSwitch.tintColor = UIColor.systemBlue
|
||||
tintedSwitch.onTintColor = UIColor.systemGreen
|
||||
tintedSwitch.thumbTintColor = UIColor.systemPurple
|
||||
func configureTintedSwitch(_ switchControl: UISwitch) {
|
||||
switchControl.tintColor = UIColor.systemBlue
|
||||
switchControl.onTintColor = UIColor.systemGreen
|
||||
switchControl.thumbTintColor = UIColor.systemPurple
|
||||
|
||||
tintedSwitch.addTarget(self, action: #selector(SwitchViewController.switchValueDidChange(_:)), for: .valueChanged)
|
||||
|
||||
// Note that on the Mac, tinted switches are not possible, so we hide the tinted one.
|
||||
if traitCollection.userInterfaceIdiom == .mac {
|
||||
tintedSwitch.isHidden = true
|
||||
}
|
||||
switchControl.addTarget(self,
|
||||
action: #selector(SwitchViewController.switchValueDidChange(_:)),
|
||||
for: .valueChanged)
|
||||
}
|
||||
|
||||
// MARK: - UITableViewDataSource
|
||||
|
||||
override func numberOfSections(in tableView: UITableView) -> Int {
|
||||
return 3
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
|
||||
#if targetEnvironment(macCatalyst)
|
||||
// Don't show tinted switch control for macOS, it does not exist.
|
||||
if section == 2 {
|
||||
return ""
|
||||
} else {
|
||||
return super.tableView(tableView, titleForHeaderInSection: section)
|
||||
}
|
||||
#else
|
||||
// Don't show checkbox switch control for iOS, it does not exist.
|
||||
if section == 1 {
|
||||
return ""
|
||||
} else {
|
||||
return super.tableView(tableView, titleForHeaderInSection: section)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView,
|
||||
heightForRowAt indexPath: IndexPath) -> CGFloat {
|
||||
#if targetEnvironment(macCatalyst)
|
||||
// Don't show tinted switch control for macOS, it does not exist.
|
||||
if indexPath.section == 2 {
|
||||
return 0
|
||||
} else {
|
||||
return super.tableView(tableView, heightForRowAt: indexPath)
|
||||
}
|
||||
#else
|
||||
// Don't show checkbox switch control for iOS, it does not exist.
|
||||
if indexPath.section == 1 {
|
||||
return 0
|
||||
} else {
|
||||
return super.tableView(tableView, heightForRowAt: indexPath)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// MARK: - Actions
|
||||
|
||||
@objc
|
||||
func switchValueDidChange(_ aSwitch: UISwitch) {
|
||||
print("A switch changed its value: \(aSwitch).")
|
||||
Swift.debugPrint("A switch changed its value: \(aSwitch.isOn).")
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
103
UIKitCatalog/SymbolViewController.swift
Executable file
|
|
@ -0,0 +1,103 @@
|
|||
/*
|
||||
See LICENSE folder for this sample’s licensing information.
|
||||
|
||||
Abstract:
|
||||
A view controller that demonstrates how to use SF Symbols.
|
||||
*/
|
||||
|
||||
import UIKit
|
||||
|
||||
class SymbolViewController: BaseTableViewController {
|
||||
|
||||
// Cell identifier for each SF Symbol table view cell.
|
||||
enum SymbolKind: String, CaseIterable {
|
||||
case plainSymbol
|
||||
case tintedSymbol
|
||||
case largeSizeSymbol
|
||||
case hierarchicalColorSymbol
|
||||
case paletteColorsSymbol
|
||||
case preferringMultiColorSymbol
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
testCells.append(contentsOf: [
|
||||
CaseElement(title: NSLocalizedString("PlainSymbolTitle", comment: ""),
|
||||
cellID: SymbolKind.plainSymbol.rawValue,
|
||||
configHandler: configurePlainSymbol),
|
||||
CaseElement(title: NSLocalizedString("TintedSymbolTitle", comment: ""),
|
||||
cellID: SymbolKind.tintedSymbol.rawValue,
|
||||
configHandler: configureTintedSymbol),
|
||||
CaseElement(title: NSLocalizedString("LargeSymbolTitle", comment: ""),
|
||||
cellID: SymbolKind.largeSizeSymbol.rawValue,
|
||||
configHandler: configureLargeSizeSymbol)
|
||||
])
|
||||
|
||||
if #available(iOS 15, *) {
|
||||
// These type SF Sybols, and variants are available on iOS 15, Mac Catalyst 15 or later.
|
||||
testCells.append(contentsOf: [
|
||||
CaseElement(title: NSLocalizedString("HierarchicalSymbolTitle", comment: ""),
|
||||
cellID: SymbolKind.hierarchicalColorSymbol.rawValue,
|
||||
configHandler: configureHierarchicalSymbol),
|
||||
CaseElement(title: NSLocalizedString("PaletteSymbolTitle", comment: ""),
|
||||
cellID: SymbolKind.paletteColorsSymbol.rawValue,
|
||||
configHandler: configurePaletteColorsSymbol),
|
||||
CaseElement(title: NSLocalizedString("PreferringMultiColorSymbolTitle", comment: ""),
|
||||
cellID: SymbolKind.preferringMultiColorSymbol.rawValue,
|
||||
configHandler: configurePreferringMultiColorSymbol)
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - UITableViewDataSource
|
||||
|
||||
override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
|
||||
let cellTest = testCells[indexPath.section]
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: cellTest.cellID)
|
||||
return cell!.contentView.bounds.size.height
|
||||
}
|
||||
|
||||
// MARK: - Configuration
|
||||
|
||||
func configurePlainSymbol(_ imageView: UIImageView) {
|
||||
let image = UIImage(systemName: "cloud.sun.rain.fill")
|
||||
imageView.image = image
|
||||
}
|
||||
|
||||
func configureTintedSymbol(_ imageView: UIImageView) {
|
||||
let image = UIImage(systemName: "cloud.sun.rain.fill")
|
||||
imageView.image = image
|
||||
imageView.tintColor = .systemPurple
|
||||
}
|
||||
|
||||
func configureLargeSizeSymbol(_ imageView: UIImageView) {
|
||||
let image = UIImage(systemName: "cloud.sun.rain.fill")
|
||||
imageView.image = image
|
||||
let symbolConfig = UIImage.SymbolConfiguration(pointSize: 32, weight: .heavy, scale: .large)
|
||||
imageView.preferredSymbolConfiguration = symbolConfig
|
||||
}
|
||||
|
||||
func configureHierarchicalSymbol(_ imageView: UIImageView) {
|
||||
let imageConfig = UIImage.SymbolConfiguration(hierarchicalColor: UIColor.systemRed)
|
||||
let hierarchicalSymbol = UIImage(systemName: "cloud.sun.rain.fill")
|
||||
imageView.image = hierarchicalSymbol
|
||||
imageView.preferredSymbolConfiguration = imageConfig
|
||||
}
|
||||
|
||||
func configurePaletteColorsSymbol(_ imageView: UIImageView) {
|
||||
let palleteSymbolConfig = UIImage.SymbolConfiguration(paletteColors: [UIColor.systemRed, UIColor.systemOrange, UIColor.systemYellow])
|
||||
let palleteSymbol = UIImage(systemName: "battery.100.bolt")
|
||||
imageView.image = palleteSymbol
|
||||
imageView.backgroundColor = UIColor.darkText
|
||||
imageView.preferredSymbolConfiguration = palleteSymbolConfig
|
||||
}
|
||||
|
||||
func configurePreferringMultiColorSymbol(_ imageView: UIImageView) {
|
||||
let preferredSymbolConfig = UIImage.SymbolConfiguration.configurationPreferringMulticolor()
|
||||
let preferredSymbol = UIImage(systemName: "circle.hexagongrid.fill")
|
||||
imageView.image = preferredSymbol
|
||||
imageView.preferredSymbolConfiguration = preferredSymbolConfig
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -7,90 +7,114 @@ A view controller that demonstrates how to use `UITextField`.
|
|||
|
||||
import UIKit
|
||||
|
||||
class TextFieldViewController: UITableViewController {
|
||||
// MARK: - Properties
|
||||
|
||||
@IBOutlet weak var textField: UITextField!
|
||||
@IBOutlet weak var tintedTextField: UITextField!
|
||||
@IBOutlet weak var secureTextField: UITextField!
|
||||
@IBOutlet weak var specificKeyboardTextField: UITextField!
|
||||
@IBOutlet weak var customTextField: UITextField!
|
||||
@IBOutlet weak var searchTextField: CustomTextField!
|
||||
class TextFieldViewController: BaseTableViewController {
|
||||
|
||||
// MARK: View Life Cycle
|
||||
// Cell identifier for each text field table view cell.
|
||||
enum TextFieldKind: String, CaseIterable {
|
||||
case textField
|
||||
case tintedTextField
|
||||
case secureTextField
|
||||
case specificKeyboardTextField
|
||||
case customTextField
|
||||
case searchTextField
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
configureTextField()
|
||||
configureTintedTextField()
|
||||
configureSecureTextField()
|
||||
configureSpecificKeyboardTextField()
|
||||
configureCustomTextField()
|
||||
configureSearchTextField()
|
||||
testCells.append(contentsOf: [
|
||||
CaseElement(title: NSLocalizedString("DefaultTextFieldTitle", comment: ""),
|
||||
cellID: TextFieldKind.textField.rawValue,
|
||||
configHandler: configureTextField),
|
||||
CaseElement(title: NSLocalizedString("TintedTextFieldTitle", comment: ""),
|
||||
cellID: TextFieldKind.tintedTextField.rawValue,
|
||||
configHandler: configureTintedTextField),
|
||||
CaseElement(title: NSLocalizedString("SecuretTextFieldTitle", comment: ""),
|
||||
cellID: TextFieldKind.secureTextField.rawValue,
|
||||
configHandler: configureSecureTextField),
|
||||
CaseElement(title: NSLocalizedString("SearchTextFieldTitle", comment: ""),
|
||||
cellID: TextFieldKind.searchTextField.rawValue,
|
||||
configHandler: configureSearchTextField)
|
||||
])
|
||||
|
||||
if traitCollection.userInterfaceIdiom != .mac {
|
||||
testCells.append(contentsOf: [
|
||||
// Show text field with specific kind of keyboard for iOS only.
|
||||
CaseElement(title: NSLocalizedString("SpecificKeyboardTextFieldTitle", comment: ""),
|
||||
cellID: TextFieldKind.specificKeyboardTextField.rawValue,
|
||||
configHandler: configureSpecificKeyboardTextField),
|
||||
|
||||
// Show text field with custom background for iOS only.
|
||||
CaseElement(title: NSLocalizedString("CustomTextFieldTitle", comment: ""),
|
||||
cellID: TextFieldKind.customTextField.rawValue,
|
||||
configHandler: configureCustomTextField)
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// MARK: - Configuration
|
||||
|
||||
func configureTextField() {
|
||||
func configureTextField(_ textField: UITextField) {
|
||||
textField.placeholder = NSLocalizedString("Placeholder text", comment: "")
|
||||
textField.autocorrectionType = .yes
|
||||
textField.returnKeyType = .done
|
||||
textField.clearButtonMode = .whileEditing
|
||||
}
|
||||
|
||||
func configureTintedTextField() {
|
||||
tintedTextField.tintColor = UIColor.systemBlue
|
||||
tintedTextField.textColor = UIColor.systemGreen
|
||||
func configureTintedTextField(_ textField: UITextField) {
|
||||
textField.tintColor = UIColor.systemBlue
|
||||
textField.textColor = UIColor.systemGreen
|
||||
|
||||
tintedTextField.placeholder = NSLocalizedString("Placeholder text", comment: "")
|
||||
tintedTextField.returnKeyType = .done
|
||||
tintedTextField.clearButtonMode = .never
|
||||
textField.placeholder = NSLocalizedString("Placeholder text", comment: "")
|
||||
textField.returnKeyType = .done
|
||||
textField.clearButtonMode = .never
|
||||
}
|
||||
|
||||
func configureSecureTextField() {
|
||||
secureTextField.isSecureTextEntry = true
|
||||
func configureSecureTextField(_ textField: UITextField) {
|
||||
textField.isSecureTextEntry = true
|
||||
|
||||
secureTextField.placeholder = NSLocalizedString("Placeholder text", comment: "")
|
||||
secureTextField.returnKeyType = .done
|
||||
secureTextField.clearButtonMode = .always
|
||||
textField.placeholder = NSLocalizedString("Placeholder text", comment: "")
|
||||
textField.returnKeyType = .done
|
||||
textField.clearButtonMode = .always
|
||||
}
|
||||
|
||||
func configureSearchTextField() {
|
||||
searchTextField.placeholder = NSLocalizedString("Enter search text", comment: "")
|
||||
searchTextField.returnKeyType = .done
|
||||
searchTextField.clearButtonMode = .always
|
||||
searchTextField.allowsDeletingTokens = true
|
||||
func configureSearchTextField(_ textField: UITextField) {
|
||||
if let searchField = textField as? UISearchTextField {
|
||||
searchField.placeholder = NSLocalizedString("Enter search text", comment: "")
|
||||
searchField.returnKeyType = .done
|
||||
searchField.clearButtonMode = .always
|
||||
searchField.allowsDeletingTokens = true
|
||||
|
||||
// Setup the left view as a symbol image view.
|
||||
let searchIcon = UIImageView(image: UIImage(systemName: "magnifyingglass"))
|
||||
searchIcon.tintColor = UIColor.systemGray
|
||||
searchField.leftView = searchIcon
|
||||
searchField.leftViewMode = .always
|
||||
|
||||
// Setup the left view as a symbol image view.
|
||||
let searchIcon = UIImageView(image: UIImage(systemName: "magnifyingglass"))
|
||||
searchIcon.tintColor = UIColor.systemGray
|
||||
searchTextField.leftView = searchIcon
|
||||
searchTextField.leftViewMode = .always
|
||||
|
||||
let secondToken = UISearchToken(icon: UIImage(systemName: "staroflife"), text: "Token 2")
|
||||
searchTextField.insertToken(secondToken, at: 0)
|
||||
|
||||
let firstToken = UISearchToken(icon: UIImage(systemName: "staroflife.fill"), text: "Token 1")
|
||||
searchTextField.insertToken(firstToken, at: 0)
|
||||
let secondToken = UISearchToken(icon: UIImage(systemName: "staroflife"), text: "Token 2")
|
||||
searchField.insertToken(secondToken, at: 0)
|
||||
|
||||
let firstToken = UISearchToken(icon: UIImage(systemName: "staroflife.fill"), text: "Token 1")
|
||||
searchField.insertToken(firstToken, at: 0)
|
||||
}
|
||||
}
|
||||
|
||||
/** There are many different types of keyboards that you may choose to use.
|
||||
The different types of keyboards are defined in the `UITextInputTraits` interface.
|
||||
This example shows how to display a keyboard to help enter email addresses.
|
||||
*/
|
||||
func configureSpecificKeyboardTextField() {
|
||||
specificKeyboardTextField.keyboardType = .emailAddress
|
||||
func configureSpecificKeyboardTextField(_ textField: UITextField) {
|
||||
textField.keyboardType = .emailAddress
|
||||
|
||||
specificKeyboardTextField.placeholder = NSLocalizedString("Placeholder text", comment: "")
|
||||
specificKeyboardTextField.returnKeyType = .done
|
||||
textField.placeholder = NSLocalizedString("Placeholder text", comment: "")
|
||||
textField.returnKeyType = .done
|
||||
}
|
||||
|
||||
func configureCustomTextField() {
|
||||
func configureCustomTextField(_ textField: UITextField) {
|
||||
// Text fields with custom image backgrounds must have no border.
|
||||
customTextField.borderStyle = .none
|
||||
textField.borderStyle = .none
|
||||
|
||||
customTextField.background = UIImage(named: "text_field_background")
|
||||
textField.background = UIImage(named: "text_field_background")
|
||||
|
||||
// Create a purple button to be used as the right view of the custom text field.
|
||||
let purpleImage = UIImage(named: "text_field_purple_right_view")!
|
||||
|
|
@ -99,51 +123,20 @@ class TextFieldViewController: UITableViewController {
|
|||
purpleImageButton.imageEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 5)
|
||||
purpleImageButton.setImage(purpleImage, for: .normal)
|
||||
purpleImageButton.addTarget(self, action: #selector(TextFieldViewController.customTextFieldPurpleButtonClicked), for: .touchUpInside)
|
||||
customTextField.rightView = purpleImageButton
|
||||
customTextField.rightViewMode = .always
|
||||
textField.rightView = purpleImageButton
|
||||
textField.rightViewMode = .always
|
||||
|
||||
customTextField.placeholder = NSLocalizedString("Placeholder text", comment: "")
|
||||
customTextField.autocorrectionType = .no
|
||||
customTextField.clearButtonMode = .never
|
||||
customTextField.returnKeyType = .done
|
||||
textField.placeholder = NSLocalizedString("Placeholder text", comment: "")
|
||||
textField.autocorrectionType = .no
|
||||
textField.clearButtonMode = .never
|
||||
textField.returnKeyType = .done
|
||||
}
|
||||
|
||||
// MARK: - Actions
|
||||
|
||||
@objc
|
||||
func customTextFieldPurpleButtonClicked() {
|
||||
print("The custom text field's purple right view button was clicked.")
|
||||
}
|
||||
|
||||
// MARK: - UITableViewDataSource
|
||||
|
||||
override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
|
||||
#if targetEnvironment(macCatalyst)
|
||||
// Don't show text field with custom background for macOS, it does not exist.
|
||||
if section == 4 {
|
||||
return ""
|
||||
} else {
|
||||
return super.tableView(tableView, titleForHeaderInSection: section)
|
||||
}
|
||||
#else
|
||||
return super.tableView(tableView, titleForHeaderInSection: section)
|
||||
#endif
|
||||
}
|
||||
|
||||
// MARK: - UITableViewDelegate
|
||||
|
||||
override func tableView(_ tableView: UITableView,
|
||||
heightForRowAt indexPath: IndexPath) -> CGFloat {
|
||||
#if targetEnvironment(macCatalyst)
|
||||
// Don't show text field with custom background for macOS, it does not exist.
|
||||
if indexPath.section == 4 {
|
||||
return 0
|
||||
} else {
|
||||
return super.tableView(tableView, heightForRowAt: indexPath)
|
||||
}
|
||||
#else
|
||||
return super.tableView(tableView, heightForRowAt: indexPath)
|
||||
#endif
|
||||
Swift.debugPrint("The custom text field's purple right view button was clicked.")
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -167,18 +160,21 @@ extension TextFieldViewController: UITextFieldDelegate {
|
|||
}
|
||||
|
||||
// Custom text field for controlling input text placement.
|
||||
class CustomTextField: UISearchTextField {
|
||||
class CustomTextField: UITextField {
|
||||
let leftMarginPadding: CGFloat = 12
|
||||
|
||||
let rightMarginPadding: CGFloat = 36
|
||||
|
||||
override func textRect(forBounds bounds: CGRect) -> CGRect {
|
||||
var rect = bounds
|
||||
rect.origin.x += leftMarginPadding
|
||||
rect.size.width -= rightMarginPadding
|
||||
return rect
|
||||
}
|
||||
|
||||
override func editingRect(forBounds bounds: CGRect) -> CGRect {
|
||||
var rect = bounds
|
||||
rect.origin.x += leftMarginPadding
|
||||
rect.size.width -= rightMarginPadding
|
||||
return rect
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class TextViewController: UIViewController {
|
|||
|
||||
@objc
|
||||
func handleKeyboardNotification(_ notification: Notification) {
|
||||
let userInfo = notification.userInfo!
|
||||
guard let userInfo = notification.userInfo else { return }
|
||||
|
||||
// Get the animation duration.
|
||||
var animationDuration: TimeInterval = 0
|
||||
|
|
@ -107,7 +107,7 @@ class TextViewController: UIViewController {
|
|||
entireAttributedText.addAttribute(NSAttributedString.Key.foregroundColor, value: entireTextColor, range: entireRange)
|
||||
textView.attributedText = entireAttributedText
|
||||
|
||||
/** Let's modify some of the attributes of the attributed string.
|
||||
/** Modify some of the attributes of the attributed string.
|
||||
You can modify these attributes yourself to get a better feel for what they do.
|
||||
Note that the initial text is visible in the storyboard.
|
||||
*/
|
||||
|
|
@ -124,9 +124,7 @@ class TextViewController: UIViewController {
|
|||
let underlinedRange = text.range(of: NSLocalizedString("underlined", comment: ""))
|
||||
let tintedRange = text.range(of: NSLocalizedString("tinted", comment: ""))
|
||||
|
||||
/** Add bold attribute. Take the current font descriptor and create a new font descriptor
|
||||
with an additional bold trait.
|
||||
*/
|
||||
// Add bold attribute. Take the current font descriptor and create a new font descriptor with an additional bold trait.
|
||||
let boldFontDescriptor = textView.font!.fontDescriptor.withSymbolicTraits(.traitBold)
|
||||
let boldFont = UIFont(descriptor: boldFontDescriptor!, size: 0)
|
||||
attributedText.addAttribute(NSAttributedString.Key.font, value: boldFont, range: boldRange)
|
||||
|
|
@ -156,6 +154,15 @@ class TextViewController: UIViewController {
|
|||
return NSAttributedString(attachment: symbolAttachment)
|
||||
}
|
||||
|
||||
func multiColorSymbolAttributedString(name: String) -> NSAttributedString {
|
||||
let symbolAttachment = NSTextAttachment()
|
||||
let palleteSymbolConfig = UIImage.SymbolConfiguration(paletteColors: [UIColor.systemOrange, UIColor.systemRed])
|
||||
if let symbolImage = UIImage(systemName: name)?.withConfiguration(palleteSymbolConfig) {
|
||||
symbolAttachment.image = symbolImage
|
||||
}
|
||||
return NSAttributedString(attachment: symbolAttachment)
|
||||
}
|
||||
|
||||
func configureTextView() {
|
||||
let bodyFontDescriptor = UIFontDescriptor.preferredFontDescriptor(withTextStyle: UIFont.TextStyle.body)
|
||||
let bodyFont = UIFont(descriptor: bodyFontDescriptor, size: 0)
|
||||
|
|
@ -179,6 +186,12 @@ class TextViewController: UIViewController {
|
|||
insertPoint += 1
|
||||
attributedText.insert(symbolAttributedString(name: "heart.slash"), at: insertPoint)
|
||||
|
||||
// Multi-color SF Symbols only in iOS 15 or later.
|
||||
if #available(iOS 15, *) {
|
||||
insertPoint += 1
|
||||
attributedText.insert(multiColorSymbolAttributedString(name: "arrow.up.heart.fill"), at: insertPoint)
|
||||
}
|
||||
|
||||
// Add the image as an attachment.
|
||||
if let image = UIImage(named: "text_view_attachment") {
|
||||
let textAttachment = NSTextAttachment()
|
||||
|
|
|
|||
|
|
@ -22,6 +22,29 @@
|
|||
<string>1</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UIApplicationSceneManifest</key>
|
||||
<dict>
|
||||
<key>UIApplicationSupportsMultipleScenes</key>
|
||||
<false/>
|
||||
<key>UISceneConfigurations</key>
|
||||
<dict>
|
||||
<key>UIWindowSceneSessionRoleApplication</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UISceneClassName</key>
|
||||
<string>UIWindowScene</string>
|
||||
<key>UISceneConfigurationName</key>
|
||||
<string>Default Configuration</string>
|
||||
<key>UISceneDelegateClassName</key>
|
||||
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
|
||||
<key>UISceneStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
|
|
@ -43,28 +66,5 @@
|
|||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIApplicationSceneManifest</key>
|
||||
<dict>
|
||||
<key>UIApplicationSupportsMultipleScenes</key>
|
||||
<false/>
|
||||
<key>UISceneConfigurations</key>
|
||||
<dict>
|
||||
<key>UIWindowSceneSessionRoleApplication</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UISceneClassName</key>
|
||||
<string>UIWindowScene</string>
|
||||
<key>UISceneConfigurationName</key>
|
||||
<string>Default Configuration</string>
|
||||
<key>UISceneDelegateClassName</key>
|
||||
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
|
||||
<key>UISceneStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
|||
41
UIKitCatalog/UIKitCatalog/Base.lproj/Localizable.stringsdict
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Cart Items String</key>
|
||||
<dict>
|
||||
<key>NSStringLocalizedFormatKey</key>
|
||||
<string>%#@items@</string>
|
||||
<key>items</key>
|
||||
<dict>
|
||||
<key>NSStringFormatSpecTypeKey</key>
|
||||
<string>NSStringPluralRuleType</string>
|
||||
<key>NSStringFormatValueTypeKey</key>
|
||||
<string>d</string>
|
||||
<key>one</key>
|
||||
<string>%d item</string>
|
||||
<key>other</key>
|
||||
<string>%d items</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<key>Cart Tooltip String</key>
|
||||
<dict>
|
||||
<key>NSStringLocalizedFormatKey</key>
|
||||
<string>%#@items@</string>
|
||||
<key>items</key>
|
||||
<dict>
|
||||
<key>NSStringFormatSpecTypeKey</key>
|
||||
<string>NSStringPluralRuleType</string>
|
||||
<key>NSStringFormatValueTypeKey</key>
|
||||
<string>d</string>
|
||||
<key>zero</key>
|
||||
<string>Cart is Empty</string>
|
||||
<key>one</key>
|
||||
<string>Cart has %d item</string>
|
||||
<key>other</key>
|
||||
<string>Cart has %d items</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
68
UIKitCatalog/VisualEffectViewController.swift
Executable file
|
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
See LICENSE folder for this sample’s licensing information.
|
||||
|
||||
Abstract:
|
||||
A view controller that demonstrates how to use `UIVisualEffectView`.
|
||||
*/
|
||||
|
||||
import UIKit
|
||||
|
||||
class VisualEffectViewController: UIViewController {
|
||||
// MARK: - Properties
|
||||
|
||||
@IBOutlet var imageView: UIImageView!
|
||||
|
||||
private var visualEffect: UIVisualEffectView = {
|
||||
let vev = UIVisualEffectView(effect: UIBlurEffect(style: .regular))
|
||||
vev.translatesAutoresizingMaskIntoConstraints = false
|
||||
return vev
|
||||
}()
|
||||
|
||||
private var textView: UITextView = {
|
||||
let textView = UITextView(frame: CGRect())
|
||||
textView.font = UIFont.systemFont(ofSize: 14)
|
||||
textView.text = NSLocalizedString("VisualEffectTextContent", comment: "")
|
||||
|
||||
textView.translatesAutoresizingMaskIntoConstraints = false
|
||||
textView.backgroundColor = UIColor.clear
|
||||
if let fontDescriptor = UIFontDescriptor
|
||||
.preferredFontDescriptor(withTextStyle: UIFont.TextStyle.body)
|
||||
.withSymbolicTraits(UIFontDescriptor.SymbolicTraits.traitLooseLeading) {
|
||||
let looseLeadingFont = UIFont(descriptor: fontDescriptor, size: 0)
|
||||
textView.font = looseLeadingFont
|
||||
}
|
||||
return textView
|
||||
}()
|
||||
|
||||
// MARK: - View Life Cycle
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
// Add the visual effect view in the same area covering the image view.
|
||||
view.addSubview(visualEffect)
|
||||
NSLayoutConstraint.activate([
|
||||
visualEffect.topAnchor.constraint(equalTo: imageView.topAnchor),
|
||||
visualEffect.leadingAnchor.constraint(equalTo: imageView.leadingAnchor),
|
||||
visualEffect.trailingAnchor.constraint(equalTo: imageView.trailingAnchor),
|
||||
visualEffect.bottomAnchor.constraint(equalTo: imageView.bottomAnchor)
|
||||
])
|
||||
|
||||
// Add a text view as a subview to the visual effect view.
|
||||
visualEffect.contentView.addSubview(textView)
|
||||
NSLayoutConstraint.activate([
|
||||
textView.topAnchor.constraint(equalTo: visualEffect.safeAreaLayoutGuide.topAnchor),
|
||||
textView.leadingAnchor.constraint(equalTo: visualEffect.safeAreaLayoutGuide.leadingAnchor),
|
||||
textView.trailingAnchor.constraint(equalTo: visualEffect.safeAreaLayoutGuide.trailingAnchor),
|
||||
textView.bottomAnchor.constraint(equalTo: visualEffect.safeAreaLayoutGuide.bottomAnchor)
|
||||
])
|
||||
|
||||
if #available(iOS 15, *) {
|
||||
// Use UIToolTipInteraction which is available on iOS 15 or later, add it to the image view.
|
||||
let toolTipString = NSLocalizedString("VisualEffectToolTipTitle", comment: "")
|
||||
let interaction = UIToolTipInteraction(defaultToolTip: toolTipString)
|
||||
imageView.addInteraction(interaction)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||