123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- //
- // SmallToolViewController.m
- // KulexiuForStudent
- //
- // Created by 王智 on 2022/10/13.
- //
- #import "SmallToolViewController.h"
- #import "WidgetViewController.h"
- #import "SmallToolBodyView.h"
- #import "ToneTuningViewController.h"
- @interface SmallToolViewController ()
- @end
- @implementation SmallToolViewController
- - (void)viewDidLoad {
- [super viewDidLoad];
- // Do any additional setup after loading the view.
- [self allocTitle:@"小工具"];
- [self configUI];
- }
- - (void)configUI {
- SmallToolBodyView *bodyView = [SmallToolBodyView shareInstance];
- bodyView.frame = CGRectMake(0, 0, KPortraitWidth, KPortraitHeight - kNaviBarHeight);
- [self.scrollView addSubview:bodyView];
-
- MJWeakSelf;
- [bodyView chooseToolCallback:^(TOOLTYPE type) {
- [weakSelf chooseToolFunction:type];
- }];
- }
- - (void)chooseToolFunction:(TOOLTYPE)type {
- switch (type) {
- case TOOLTYPE_METRONOME:
- {
- WidgetViewController *ctrl = [[WidgetViewController alloc] init];
- [self.navigationController pushViewController:ctrl animated:YES];
- }
- break;
- case TOOLTYPE_TONE:
- {
- ToneTuningViewController *ctrl = [[ToneTuningViewController alloc] init];
- [self.navigationController pushViewController:ctrl animated:YES];
- }
- break;
- default:
- break;
- }
- }
- /*
- #pragma mark - Navigation
- // In a storyboard-based application, you will often want to do a little preparation before navigation
- - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
- // Get the new view controller using [segue destinationViewController].
- // Pass the selected object to the new view controller.
- }
- */
- @end
|