Skip to content
This repository was archived by the owner on Apr 7, 2023. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions TSPopover/TSPopoverController.m
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ - (id)init {
screenRect.size.height = screenRect.size.height-20;

titleLabelheight = 0;

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationChanged:) name:UIDeviceOrientationDidChangeNotification object:nil];
}
return self;
}
Expand Down Expand Up @@ -208,6 +210,11 @@ - (void)view:(UIView*)view touchesBegan:(NSSet*)touches withEvent:(UIEvent*)even
[self dismissPopoverAnimatd:YES];
}

- (void)orientationChanged:(NSNotification *)notification
{
[self dismissPopoverAnimatd:NO];
}


- (void) dismissPopoverAnimatd:(BOOL)animated
{
Expand Down Expand Up @@ -240,6 +247,8 @@ - (void) dismissPopoverAnimatd:(BOOL)animated
}

}

[[NSNotificationCenter defaultCenter] removeObserver:self];
}

- (CGRect) contentFrameRect:(CGRect)contentFrame senderPoint:(CGPoint)senderPoint
Expand Down