Skip to content

Commit 8dfb22e

Browse files
committed
Merge pull request #8 from tapglue/fix-warnings
Fix warnings
2 parents 011ce6d + 7ae8212 commit 8dfb22e

File tree

11 files changed

+41
-30
lines changed

11 files changed

+41
-30
lines changed

Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/TapglueElements.xcscheme

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/elements.xcscheme

Lines changed: 25 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/elements.xcodeproj/xcshareddata/xcschemes/elements-Example.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0720"
3+
LastUpgradeVersion = "0730"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Pod/Classes/ConnectionsViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class ConnectionsViewController: UITableViewController, ConnectionCellDel
3636

3737
override public func viewDidLoad() {
3838
super.viewDidLoad()
39-
let search = UIBarButtonItem(barButtonSystemItem: .Search, target: self, action: "searchTapped")
39+
let search = UIBarButtonItem(barButtonSystemItem: .Search, target: self, action: #selector(ConnectionsViewController.searchTapped))
4040
navigationItem.rightBarButtonItem = search
4141
tableView.backgroundColor = UIColor.clearColor()
4242
applyConfiguration(TapglueUI.config)

Pod/Classes/EditProfileViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class EditProfileViewController: UIViewController {
2828
super.viewDidLoad()
2929
userNameTextField.text = TGUser.currentUser().username
3030

31-
let save = UIBarButtonItem(barButtonSystemItem: .Save, target: self, action: "saveTapped")
31+
let save = UIBarButtonItem(barButtonSystemItem: .Save, target: self, action: #selector(EditProfileViewController.saveTapped))
3232
navigationItem.rightBarButtonItem = save
3333
view.backgroundColor = UIColor.clearColor()
3434
applyConfiguration(TapglueUI.config)

Pod/Classes/NotificationFeedViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ public class NotificationFeedViewController: UIViewController {
4141
tableView.registerNibs(nibNames: [cellFollowEventReusableIdentifier, cellFollwedMeEventReusableIdentifier, cellLikeEventReusableIdentifier])
4242
tableView.estimatedRowHeight = 80
4343
tableView.rowHeight = UITableViewAutomaticDimension
44-
let backButton = UIBarButtonItem(barButtonSystemItem: .Done, target: self, action: "popViewController")
44+
let backButton = UIBarButtonItem(barButtonSystemItem: .Done, target: self, action: #selector(NotificationFeedViewController.popViewController))
4545
navigationItem.leftBarButtonItem = backButton
4646

47-
refreshControl.addTarget(self, action: "refresh", forControlEvents: .ValueChanged)
47+
refreshControl.addTarget(self, action: #selector(NotificationFeedViewController.refresh), forControlEvents: .ValueChanged)
4848
tableView.addSubview(refreshControl)
4949
tableView.backgroundColor = UIColor.clearColor()
5050
applyConfiguration(TapglueUI.config)

Pod/Classes/ProfileViewController.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class ProfileViewController: UIViewController, ProfileBiographyDelegate {
3838
var user: TGUser? {
3939
didSet {
4040
if user?.isCurrentUser ?? false {
41-
let edit = UIBarButtonItem(barButtonSystemItem: .Edit, target: self, action: "editTapped")
41+
let edit = UIBarButtonItem(barButtonSystemItem: .Edit, target: self, action: #selector(ProfileViewController.editTapped))
4242
navigationItem.rightBarButtonItem = edit
4343
}
4444
}
@@ -55,7 +55,7 @@ public class ProfileViewController: UIViewController, ProfileBiographyDelegate {
5555
tableView.estimatedRowHeight = 80
5656
tableView.rowHeight = UITableViewAutomaticDimension
5757

58-
refreshControl.addTarget(self, action: "refresh:", forControlEvents: .ValueChanged)
58+
refreshControl.addTarget(self, action: #selector(ProfileViewController.refresh(_:)), forControlEvents: .ValueChanged)
5959
tableView.addSubview(refreshControl)
6060
tableView.backgroundColor = UIColor.clearColor()
6161
applyConfiguration(TapglueUI.config)
@@ -74,7 +74,7 @@ public class ProfileViewController: UIViewController, ProfileBiographyDelegate {
7474

7575
let n = self.navigationController!.viewControllers.count - 2
7676
if n < 0 {
77-
let backButton = UIBarButtonItem(barButtonSystemItem: .Done, target: self, action: "popViewController")
77+
let backButton = UIBarButtonItem(barButtonSystemItem: .Done, target: self, action: #selector(ProfileViewController.popViewController))
7878
navigationItem.leftBarButtonItem = backButton
7979
}
8080
}

Pod/Classes/views/FollowButton.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class FollowButton: UIButton {
3333
didSet {
3434
followConfig = TapglueUI.config.followButtonConfig
3535
setStateForUser()
36-
addTarget(self, action: "followPressed", forControlEvents: .TouchUpInside)
36+
addTarget(self, action: #selector(FollowButton.followPressed), forControlEvents: .TouchUpInside)
3737
}
3838
}
3939

Pod/Classes/views/FollowEventCell.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ class FollowEventCell: UITableViewCell {
3131
if let event = event {
3232
followingUser = event.user
3333
followedUser = event.target.user
34-
var userNameAttributes = [NSFontAttributeName : UIFont.boldSystemFontOfSize(16)]
34+
let userNameAttributes = [NSFontAttributeName : UIFont.boldSystemFontOfSize(16)]
3535
let followingUserName = followingUser!.firstName + " " + followingUser!.lastName
3636

37-
var followText = NSMutableAttributedString(string:followingUserName, attributes:userNameAttributes)
37+
let followText = NSMutableAttributedString(string:followingUserName, attributes:userNameAttributes)
3838
followText.appendAttributedString(NSMutableAttributedString(string:" started following "))
3939
let followedUserName = followedUser!.firstName + " " + followedUser!.lastName
4040
followText.appendAttributedString(NSMutableAttributedString(string:followedUserName, attributes: userNameAttributes))

Pod/Classes/views/FollowedMeEventCell.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ class FollowedMeEventCell: UITableViewCell {
3737
private(set) var user: TGUser? {
3838
didSet {
3939
if let user = user {
40-
var userNameAttributes = [NSFontAttributeName : UIFont.boldSystemFontOfSize(16)]
41-
var followingMeText = NSMutableAttributedString(string:user.firstName + " " + user.lastName, attributes:userNameAttributes)
40+
let userNameAttributes = [NSFontAttributeName : UIFont.boldSystemFontOfSize(16)]
41+
let followingMeText = NSMutableAttributedString(string:user.firstName + " " + user.lastName, attributes:userNameAttributes)
4242
followingMeText.appendAttributedString(NSMutableAttributedString(string:" started following you"))
4343
userLabel.attributedText = followingMeText
4444
userImage.setUserPicture(user)

0 commit comments

Comments
 (0)