Skip to content

Commit

Permalink
Merge pull request #1173 from OrkhanAlikhanov/dialog
Browse files Browse the repository at this point in the history
Well done :)
  • Loading branch information
DanielDahan authored Oct 16, 2018
2 parents 77a779d + d75d3a7 commit e26faf0
Show file tree
Hide file tree
Showing 5 changed files with 942 additions and 8 deletions.
20 changes: 20 additions & 0 deletions Material.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@
9D054A6620D175AC00D0528D /* Material+UILabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D054A6420D175AC00D0528D /* Material+UILabel.swift */; };
9D39A81B20FE8ED100BA8FA1 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D39A81A20FE8ED100BA8FA1 /* ViewController.swift */; };
9D9089B92118914500605DC9 /* Editor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D9089B82118914500605DC9 /* Editor.swift */; };
9DE25DE02170D7AF000C04DF /* Dialog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DE25DDF2170D7AF000C04DF /* Dialog.swift */; };
9DE25DE22170D7C0000C04DF /* DialogController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DE25DE12170D7C0000C04DF /* DialogController.swift */; };
9DE25DE42170D7FF000C04DF /* DialogView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DE25DE32170D7FF000C04DF /* DialogView.swift */; };
9DE84D721FF0252600586C8B /* RadioButtonGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DE84D6F1FF0252500586C8B /* RadioButtonGroup.swift */; };
9DE84D731FF0252600586C8B /* BaseButtonGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DE84D701FF0252500586C8B /* BaseButtonGroup.swift */; };
9DE84D741FF0252600586C8B /* CheckButtonGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DE84D711FF0252500586C8B /* CheckButtonGroup.swift */; };
Expand Down Expand Up @@ -298,6 +301,9 @@
9D054A6420D175AC00D0528D /* Material+UILabel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Material+UILabel.swift"; sourceTree = "<group>"; };
9D39A81A20FE8ED100BA8FA1 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
9D9089B82118914500605DC9 /* Editor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Editor.swift; sourceTree = "<group>"; };
9DE25DDF2170D7AF000C04DF /* Dialog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dialog.swift; sourceTree = "<group>"; };
9DE25DE12170D7C0000C04DF /* DialogController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DialogController.swift; sourceTree = "<group>"; };
9DE25DE32170D7FF000C04DF /* DialogView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DialogView.swift; sourceTree = "<group>"; };
9DE84D6F1FF0252500586C8B /* RadioButtonGroup.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RadioButtonGroup.swift; sourceTree = "<group>"; };
9DE84D701FF0252500586C8B /* BaseButtonGroup.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseButtonGroup.swift; sourceTree = "<group>"; };
9DE84D711FF0252500586C8B /* CheckButtonGroup.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckButtonGroup.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -550,6 +556,7 @@
96BCB8001CB40F0300C806FE /* Color */,
96328B9A1E05C135009A4C90 /* Data */,
96BCB80B1CB410CC00C806FE /* Device */,
9DE25DDE2170D779000C04DF /* Dialogs */,
96230AB61D6A51FD00AF47DC /* Divider */,
96BCB80A1CB410A100C806FE /* Extension */,
963FBF021D6696D0008F8512 /* FABMenu */,
Expand Down Expand Up @@ -771,6 +778,16 @@
name = Theme;
sourceTree = "<group>";
};
9DE25DDE2170D779000C04DF /* Dialogs */ = {
isa = PBXGroup;
children = (
9DE25DDF2170D7AF000C04DF /* Dialog.swift */,
9DE25DE12170D7C0000C04DF /* DialogController.swift */,
9DE25DE32170D7FF000C04DF /* DialogView.swift */,
);
name = Dialogs;
sourceTree = "<group>";
};
9DE84D6E1FF0250E00586C8B /* ButtonGroup */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1015,9 +1032,12 @@
9DE84D721FF0252600586C8B /* RadioButtonGroup.swift in Sources */,
9D00EBB4216675FB00DBCD69 /* Theme.swift in Sources */,
965E80FE1DD4D59500D61E4B /* ToolbarController.swift in Sources */,
9DE25DE22170D7C0000C04DF /* DialogController.swift in Sources */,
9DE25DE42170D7FF000C04DF /* DialogView.swift in Sources */,
96328B971E05C0BB009A4C90 /* TableView.swift in Sources */,
965E80F81DD4D59500D61E4B /* ImageCard.swift in Sources */,
96328B991E05C0CE009A4C90 /* TableViewController.swift in Sources */,
9DE25DE02170D7AF000C04DF /* Dialog.swift in Sources */,
965E80F91DD4D59500D61E4B /* PresenterCard.swift in Sources */,
96E09DC81F2287E50000B121 /* TabsController.swift in Sources */,
961154CC1F32A7B100A78D74 /* ChipBar.swift in Sources */,
Expand Down
16 changes: 8 additions & 8 deletions Sources/iOS/Button.swift
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ open class Button: UIButton, Pulseable, PulseableLayer, Themeable {
/**
A convenience initializer that acceps an image and tint
- Parameter image: A UIImage.
- Parameter tintColor: A UI
- Parameter tintColor: A UIColor.
*/
public init(image: UIImage?, tintColor: UIColor = Color.blue.base) {
public init(image: UIImage?, tintColor: UIColor? = nil) {
super.init(frame: .zero)
prepare()
prepare(with: image, tintColor: tintColor)
Expand All @@ -202,9 +202,9 @@ open class Button: UIButton, Pulseable, PulseableLayer, Themeable {
/**
A convenience initializer that acceps a title and title
- Parameter title: A String.
- Parameter titleColor: A UI
- Parameter titleColor: A UIColor.
*/
public init(title: String?, titleColor: UIColor = Color.blue.base) {
public init(title: String?, titleColor: UIColor? = nil) {
super.init(frame: .zero)
prepare()
prepare(with: title, titleColor: titleColor)
Expand Down Expand Up @@ -309,19 +309,19 @@ extension Button {
- Parameter image: A UIImage.
- Parameter tintColor: A UI
*/
fileprivate func prepare(with image: UIImage?, tintColor: UIColor) {
fileprivate func prepare(with image: UIImage?, tintColor: UIColor?) {
self.image = image
self.tintColor = tintColor
self.tintColor = tintColor ?? self.tintColor
}

/**
Prepares the Button with a title and title
- Parameter title: A String.
- Parameter titleColor: A UI
*/
fileprivate func prepare(with title: String?, titleColor: UIColor) {
fileprivate func prepare(with title: String?, titleColor: UIColor?) {
self.title = title
self.titleColor = titleColor
self.titleColor = titleColor ?? self.titleColor
}
}

Expand Down
Loading

0 comments on commit e26faf0

Please sign in to comment.