File tree Expand file tree Collapse file tree
AlertViewController.xcodeproj Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717/* End PBXBuildFile section */
1818
1919/* Begin PBXFileReference section */
20+ 9F70A9341F3E33F800721047 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
2021 9F7476ED1F288C33000E2B6A /* AlertViewController.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AlertViewController.app; sourceTree = BUILT_PRODUCTS_DIR; };
2122 9F7476F01F288C33000E2B6A /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
2223 9F7476F21F288C33000E2B6A /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
4243 9F7476E41F288C33000E2B6A = {
4344 isa = PBXGroup;
4445 children = (
46+ 9F70A9341F3E33F800721047 /* README.md */,
4547 9F7476EF1F288C33000E2B6A /* AlertViewController */,
4648 9F7476EE1F288C33000E2B6A /* Products */,
4749 );
312314 9F7477011F288C33000E2B6A /* Release */,
313315 );
314316 defaultConfigurationIsVisible = 0;
317+ defaultConfigurationName = Release;
315318 };
316319/* End XCConfigurationList section */
317320 };
Original file line number Diff line number Diff line change 88
99import UIKit
1010
11- /// Adds ability to display image left of the action title, by leveraging KVO .
11+ /// Adds ability to display image left of the action title, by leveraging KVC .
1212/// Also checks whether `UIAlertAction` responds to appropriate selector to
1313/// avoid crashes if property is not available in the future.
1414extension UIAlertAction {
Original file line number Diff line number Diff line change 11# AlertViewController
2- ` UIAlertController ` subclass to show image above the alert title
2+
3+ Adds ability to display ` UIImage ` above the title label of ` UIAlertController ` .
4+ Functionality is achieved by adding “\n” characters to ` title ` , to make space
5+ for ` UIImageView ` to be added to ` UIAlertController.view ` . Set ` title ` as
6+ normal but when retrieving value use ` originalTitle ` property.
7+
8+ # UIAlertAction+Extensions
9+
10+ Adds ability to display image left of the action title, by leveraging KVC.
11+ Also checks whether ` UIAlertAction ` responds to appropriate selector to
12+ avoid crashes if property is not available in the future.
You can’t perform that action at this time.
0 commit comments