Skip to content

Commit 3e4ed94

Browse files
committed
Merge pull request Sumi-Interactive#19 from NextfazeSD/master
Orientation support for iOS 5
2 parents 8465e11 + cca9b55 commit 3e4ed94

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

SIAlertView/SIAlertView.m

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,21 @@ - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrie
163163
[self.alertView invaliadateLayout];
164164
}
165165

166+
- (NSUInteger)supportedInterfaceOrientations
167+
{
168+
return UIInterfaceOrientationMaskAll;
169+
}
170+
171+
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
172+
{
173+
return YES;
174+
}
175+
176+
- (BOOL)shouldAutorotate
177+
{
178+
return YES;
179+
}
180+
166181
@end
167182

168183
#pragma mark - SIAlert

SIAlertViewExample/SIAlertViewExample/ViewController.m

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,4 +203,19 @@ - (IBAction)alert4:(id)sender
203203
[self alert3:nil];
204204
}
205205

206+
- (NSUInteger)supportedInterfaceOrientations
207+
{
208+
return UIInterfaceOrientationMaskAll;
209+
}
210+
211+
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
212+
{
213+
return YES;
214+
}
215+
216+
- (BOOL)shouldAutorotate
217+
{
218+
return YES;
219+
}
220+
206221
@end

0 commit comments

Comments
 (0)