-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancements #68
base: master
Are you sure you want to change the base?
Enhancements #68
Conversation
I just saw that, weird, I'll try to fix it |
remove unwanted files
it's fixed now, removed those files |
@@ -36,15 +36,15 @@ private extension AppDelegate { | |||
|
|||
func configureStyling() { | |||
|
|||
window?.tintColor = UIColor.trySwiftNavigationBarColor() | |||
window?.tintColor = UIColor.trySwiftNavigationBarColor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can omit the UIColor
prefixes as these are inferred.
@@ -124,24 +142,27 @@ extension MoreTableViewController { | |||
return cell | |||
} | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this for?
acknowledgementesViewController.headerText = "We ❤️ Open Source Software".localized() | ||
|
||
performSegue(withIdentifier: moreDetailSegue, sender: acknowledgementesViewController) | ||
func navigateTo<T: UIViewController>(id: String = "moreDetailSegue", _ controller: () -> T){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔, I don't really like this signature. Especially when used without spacing for the {}
's. What about func navigate<T: UIViewController>(to controller: () -> T, id: String = "moreDetailSegue")
? Then use it with the parameter:
navigate(to: { acknowledgement })
Thoughts, @NatashaTheRobot?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BasThomas agreed - your version looks better :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that I think of it... is there any reason why this couldn't just accept a UIViewController
instead of a closure?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds much simpler that way!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks better indeed, I've replaced it
trySwift/UIImage+Downloader.swift
Outdated
@@ -0,0 +1,27 @@ | |||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was an example to separate 3rd library from code so it's to be replaced easily anytime, I'll remove it
trySwift/UITableViewExtension.swift
Outdated
@@ -14,6 +14,7 @@ extension UITableView { | |||
|
|||
let nib = UINib(nibName: T.nibName, bundle: nil) | |||
register(nib, forCellReuseIdentifier: T.reuseIdentifier) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can omit?
A few updates for code syntax:
moving uicolor functions extension to vars for more swifty way
rewriting navigate to function in settings to be generic with less lines
this was done as a part of our community activity (reading code club) in #swiftCairo
thanks