vjkaruna / tweetswift

Twitter client in Swift, for Codepath
0 stars 0 forks source link

[iOS Bootcamp] - Project 3 #1

Open vjkaruna opened 10 years ago

vjkaruna commented 10 years ago

/cc @thecodepath

sandofsky commented 10 years ago

Overall, looks great. Here are some things I might do different:

You're using selector syntax for notification center, e.g. "userDidLogout". I've been moving over to block syntax, as Apple has been discouraging selector syntax for safety reasons.

For the "profileTouch" method, I'd extract the tag numbers into an enum.

I wouldn't make properties on Users/Tweets optionals unless the API normally returns null. I think it's better to fail get objects in a half-consistent state.

I'd move "currentUser" off of User an onto an "Account" or "Session" model instance.

I'd move your "userLabelText" methods off the user object, since the model layer should not know anything about presentation. That said, for convenience, you could add them as extensions on the user model. This is similar to the UIKit extensions that add drawing methods on NSString.

Also for convenience, I'd consider making your fonts extensions on UIFont, so they're in one place that can be shared through the app.