Develop

[2014-12-09 13:11:00 EEvL] Pull Request current develop branch into master.
Given your suggestion I would probably not make a new method for a single method usage. I would probably concatenate the extraneous lines from each switch case and only have the 1 line of code that is dependent on the switch value.

As I stated in my other response, I like readable code that the next engineer can pick up and run with. If there is method A that calls method B that then calls method C (etc…) each of those methods only doing something specifically for method A. The next engineer is going to get stuck in trying to follow code execution instead of being able to understand what method A does and returns. Now if there is the possibility that method B would do something that method D could use it for then I’m all for creating method B and C and ….

> On Dec 10, 2014, at 5:38 AM, arctouch-caiofonseca <notifications@github.com> wrote:
> 
> In ArcTouchCodeChallenge/ArcTouchCodeChallenge/Sources/Controllers/DetailViewController.m <https://github.com/hockeygod/ArcTouchCodeChallenge/pull/1#discussion-diff-21603068>:
> 
> > +- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
> > +{
> > +    UIView *returnView = nil;
> > +    
> > +    //Stops
> > +    if ([tableView isEqual:self.stopsTableView])
> > +    {
> > +        returnView = nil;
> > +    }
> > +    //Departures
> > +    else if ([tableView isEqual:self.departuresTableView])
> > +    {
> > +        switch (section) {
> > +            case 0: //Weekdays
> > +            {
> > +                UILabel *workingView = [[UILabel alloc] initWithFrame:CGRectZero];
> You can add a method to create the header view to avoid repeating the code 3 times.
> 
> —
> Reply to this email directly or view it on GitHub <https://github.com/hockeygod/ArcTouchCodeChallenge/pull/1/files#r21603068>.
>