Last active
May 12, 2023 04:49
-
-
Save EthanRDoesMC/41a6b9f2ab1fd77f47aad65087c80bc3 to your computer and use it in GitHub Desktop.
OnBoardingKit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma mark - Preferences List Controller | |
@interface AriseRootListController : HBRootListController | |
-(void)arisePresentWhatsNew; | |
@end | |
#pragma mark - OnBoardingKit | |
@interface OBButtonTray : UIView | |
-(void)addButton:(id)arg1; | |
@end | |
@interface OBWelcomeController : UIViewController | |
@property (nonatomic,retain) OBButtonTray * buttonTray; | |
-(id)initWithTitle:(id)arg1 detailText:(id)arg2 icon:(id)arg3 contentLayout:(long long)arg4; | |
-(void)addBulletedListItemWithTitle:(id)arg1 description:(id)arg2 image:(id)arg3; | |
@end | |
@interface OBBoldTrayButton : UIButton | |
-(void)setTitle:(id)arg1 forState:(unsigned long long)arg2; | |
+(id)buttonWithType:(long long)arg1; | |
@end | |
// ... | |
@implementation AriseRootListController | |
#pragma mark - What's New | |
-(void)arisePresentWhatsNew { | |
// Created by EthanRDoesMC | |
// I'd love it if you would leave this comment here :D | |
// - Ethan | |
NSString *title = @"What's New"; | |
OBWelcomeController *whatsNew = [OBWelcomeController new]; | |
whatsNew = [whatsNew initWithTitle:title detailText:@"in Arise Beta" icon:[UIImage imageWithContentsOfFile:@"/Library/PreferenceBundles/AriseSettings.bundle/fullRes.png"] contentLayout:2]; | |
if (@available(iOS 13, *)) { | |
// SF Symbols are only available on 13 and up. | |
[whatsNew addBulletedListItemWithTitle:@"Live Wallpapers" description:@"Start and stop live wallpapers automatically on the lock screen." image:[UIImage systemImageNamed:@"livephoto"]]; | |
[whatsNew addBulletedListItemWithTitle:@"See What's New" description:@"See what's been added in every update." image:[UIImage systemImageNamed:@"light.max"]]; | |
[whatsNew addBulletedListItemWithTitle:@"Small adjustments" description:@"For example, setting Today to Wake and Notifications to Unlock returns to the main page to see the notifications." image:[UIImage systemImageNamed:@"ellipsis"]]; | |
} | |
// OBBoldTrayButton* continueButton = [OBBoldTrayButton buttonWithType:1]; | |
// [continueButton setTitle:@"Continue" forState:0]; | |
// [whatsNew.buttonTray addButton:continueButton]; | |
// I decided I didn't need a button, but I left this here for reference. | |
[self presentViewController:whatsNew animated:YES completion:nil]; | |
} | |
// meanwhile, elsewhere... | |
// [self arisePresentWhatsNew]; | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is an example of how to use OnBoardingKit. I... may have copied it directly from my preference bundle 😅