gresrun / GHSidebarNav

A clone of the new Facebook iOS UI paradigm
Apache License 2.0
607 stars 136 forks source link

Rotation Support #12

Closed ghost closed 11 years ago

ghost commented 11 years ago

Hey,

awesome project! I appreciate the your storyboard version.

I recognized a small bug. When the search view is showing and you rotate the view, the search view doesnt resize properly.

So I made some modifications:

  1. Adding a BOOL to Reveal View Controller

    @property BOOL searchIsShowing;
  2. Modifying toggle search view function to deal with new BOOL
if (!showSearch) {
        self.contentView.frame = CGRectOffset(self.view.bounds, CGRectGetWidth(self.view.bounds), 0.0f);
        [self.view addSubview:self.contentView];
        [self setSearchIsShowing:NO];
    } else {
        [self setSearchIsShowing:YES];
    }
  1. Adding rotation delegate
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
    NSLog(@"Content View Frame: %@", NSStringFromCGRect(self.sidebarView.frame));

    if (self.searchIsShowing)
        [self.sidebarView setFrame:self.view.bounds];
}

cheers.

gresrun commented 11 years ago

@wuaschtikus Thanks for the bug report! Would you mind making a pull request with your changes so I can incorporate them easily? http://www.topbug.net/blog/2012/03/25/attach-a-pull-request-to-an-existing-github-issue/

ghost commented 11 years ago

No problem ;).

I will make a request till end of the week.

gresrun commented 11 years ago

Any progress on the pull request?

ghost commented 11 years ago

Sorry I am late ;)

I am currently working on a big project which needs a lot of time. I am currently overworked but i will push it as soon as possible.

Von: Greg Haines notifications@github.com Antworten an: gresrun/GHSidebarNav <reply+i-10585935-206f7ca86e797de21d880b5c84f356faa902947f-1845917@reply.git hub.com> Datum: Donnerstag, 21. Februar 2013 16:14 An: gresrun/GHSidebarNav GHSidebarNav@noreply.github.com Cc: Martin martin.gruener@chello.at Betreff: Re: [GHSidebarNav] Rotation Support (#12)

Any progress on the pull request?

‹ Reply to this email directly or view it on GitHub https://github.com/gresrun/GHSidebarNav/issues/12#issuecomment-13893750 .

gresrun commented 11 years ago

No worries, mate.

gresrun commented 11 years ago

Closed by 90bce0eb6312725797147be1211bdaeb8dd66d1c