mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Added options for modal presentation style and bar style.
This commit is contained in:
parent
2884bdf354
commit
b28290cc45
@ -90,6 +90,12 @@ typedef enum {
|
||||
|
||||
BOOL requireAuthorization_;
|
||||
NSString *authenticationSecret_;
|
||||
|
||||
BOOL checkForTracker_;
|
||||
NSDictionary *trackerConfig_;
|
||||
|
||||
UIBarStyle barStyle_;
|
||||
UIModalPresentationStyle modalPresentationStyle_;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -145,6 +151,12 @@ typedef enum {
|
||||
// if NO, the user can not change it, and the default or developer defined value will be used
|
||||
@property (nonatomic, assign, getter=shouldShowUserSettings) BOOL showUserSettings;
|
||||
|
||||
// set bar style of navigation controller
|
||||
@property (nonatomic, assign) UIBarStyle barStyle;
|
||||
|
||||
// set modal presentation style of update view
|
||||
@property (nonatomic, assign) UIModalPresentationStyle modalPresentationStyle;
|
||||
|
||||
// if YES, then an update check will be performed after the application becomes active (default)
|
||||
// if NO, then the update check will not happen unless invoked explicitly
|
||||
@property (nonatomic, assign, getter=isCheckForUpdateOnLaunch) BOOL checkForUpdateOnLaunch;
|
||||
|
@ -81,8 +81,6 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain";
|
||||
|
||||
@implementation BWHockeyManager
|
||||
|
||||
@synthesize checkForTracker;
|
||||
@synthesize trackerConfig;
|
||||
@synthesize delegate = delegate_;
|
||||
@synthesize updateURL = updateURL_;
|
||||
@synthesize appIdentifier = appIdentifier_;
|
||||
@ -110,6 +108,10 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain";
|
||||
@synthesize authenticationSecret = authenticationSecret_;
|
||||
@synthesize authorizeView = authorizeView_;
|
||||
@synthesize isAppStoreEnvironment = isAppStoreEnvironment_;
|
||||
@synthesize checkForTracker = checkForTracker_;
|
||||
@synthesize trackerConfig = trackerConfig_;
|
||||
@synthesize barStyle = barStyle_;
|
||||
@synthesize modalPresentationStyle = modalPresentationStyle_;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#pragma mark -
|
||||
@ -383,6 +385,8 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain";
|
||||
self.checkForUpdateOnLaunch = YES;
|
||||
self.showUserSettings = YES;
|
||||
self.compareVersionType = HockeyComparisonResultGreater;
|
||||
self.barStyle = UIBarStyleDefault;
|
||||
self.modalPresentationStyle = UIModalPresentationFormSheet;
|
||||
|
||||
// load update setting from user defaults and check value
|
||||
if ([[NSUserDefaults standardUserDefaults] objectForKey:kHockeyAutoUpdateSetting]) {
|
||||
@ -496,6 +500,8 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain";
|
||||
|
||||
BWHockeyViewController *hockeyViewController = [self hockeyViewController:YES];
|
||||
navController_ = [[UINavigationController alloc] initWithRootViewController:hockeyViewController];
|
||||
navController_.navigationBar.barStyle = barStyle_;
|
||||
navController_.modalPresentationStyle = modalPresentationStyle_;
|
||||
|
||||
if (parentViewController) {
|
||||
if ([navController_ respondsToSelector:@selector(setModalTransitionStyle:)]) {
|
||||
|
@ -145,6 +145,16 @@
|
||||
// Default: YES
|
||||
@property (nonatomic, assign, getter=shouldShowUserSettings) BOOL showUserSettings;
|
||||
|
||||
// Set bar style of navigation controller
|
||||
//
|
||||
// Default: UIBarStyleDefault
|
||||
@property (nonatomic, assign) UIBarStyle barStyle;
|
||||
|
||||
// Set modal presentation style of update view
|
||||
//
|
||||
// Default: UIModalPresentationStyleFormSheet
|
||||
@property (nonatomic, assign) UIModalPresentationStyle modalPresentationStyle;
|
||||
|
||||
// Allow the user to disable the sending of user data; this settings should
|
||||
// only be set if showUserSettings is enabled.
|
||||
//
|
||||
|
@ -227,6 +227,22 @@
|
||||
[[BWHockeyManager sharedHockeyManager] setShowUserSettings:showUserSettings];
|
||||
}
|
||||
|
||||
- (UIBarStyle)barStyle {
|
||||
return [[BWHockeyManager sharedHockeyManager] barStyle];
|
||||
}
|
||||
|
||||
- (void)setBarStyle:(UIBarStyle)barStyle {
|
||||
[[BWHockeyManager sharedHockeyManager] setBarStyle:barStyle];
|
||||
}
|
||||
|
||||
- (UIModalPresentationStyle)modalPresentationStyle {
|
||||
return [[BWHockeyManager sharedHockeyManager] modalPresentationStyle];
|
||||
}
|
||||
|
||||
- (void)setModalPresentationStyle:(UIModalPresentationStyle)modalPresentationStyle {
|
||||
[[BWHockeyManager sharedHockeyManager] setModalPresentationStyle:modalPresentationStyle];
|
||||
}
|
||||
|
||||
- (BOOL)isUserAllowedToDisableSendData {
|
||||
return [[BWHockeyManager sharedHockeyManager] isAllowUserToDisableSendData];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user