Closed Bug 1131914 Opened 7 years ago Closed 7 years ago

Refactor delegates and file hierarchies to be more consistent

Categories

(Firefox for iOS :: General, defect)

x86
iOS 8
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bnicholson, Assigned: bnicholson)

Details

Attachments

(1 file)

47 bytes, text/x-github-pull-request
st3fan
: review+
Details | Review
Before tacking on too much as our codebase continues to expand, I'd like to take a step back and clean up some things that have been on my to-do list.
Attached file Pull request
An incremental cleanup patch that fixes a number of things, including:
* Using iOS-style naming conventions for delegates, which means using the class name as the method name. This makes code completion easier and helps to avoid namespace collisions.
* Moving the various TabBar ViewController panels into a single Home directory,  and renaming them from *ViewController to *Panel. Also renamed TabBarViewController to HomePanelViewController to make its purpose as the "master" pager more clear.
* Other miscellaneous variable renamings and whitespace cleanup.
Attachment #8562563 - Flags: review?(wjohnston)
Attachment #8562563 - Flags: review?(sarentz)
Comment on attachment 8562563 [details] [review]
Pull request

I think these are all good changes.

One comment added:


"If we really want to follow the UIKit conventions then the first argument should also be a reference to the object calling the delegate. I know that does not always make sense in cases where there is just one instance alive, but .. that is what UIKit does.

(It does actually help with state management. Specially when presenting viewcontrollers, it means that you don't have to keep a reference to the viewcontroller around. You can just use the reference that you get in your delegates.)"
Attachment #8562563 - Flags: review?(sarentz) → review+
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Attachment #8562563 - Flags: review?(wjohnston)
You need to log in before you can comment on or make changes to this bug.