From 7b02207537d35bfa1714bf8beafc921f717d100a Mon Sep 17 00:00:00 2001 From: 单军华 Date: Wed, 11 Jul 2018 10:47:42 +0800 Subject: [PATCH] 首次上传 --- screendisplay/screendisplay/Classes/Main/LMJCasesViewController.m | 121 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 121 insertions(+), 0 deletions(-) diff --git a/screendisplay/screendisplay/Classes/Main/LMJCasesViewController.m b/screendisplay/screendisplay/Classes/Main/LMJCasesViewController.m new file mode 100755 index 0000000..3a7980c --- /dev/null +++ b/screendisplay/screendisplay/Classes/Main/LMJCasesViewController.m @@ -0,0 +1,121 @@ +// +// LMJCasesViewController.m +// iOSProject +// +// Created by windshan on 2018/1/22. +// Copyright �� 2018��� windshan. All rights reserved. +// + +#import "LMJCasesViewController.h" +#import <DWBubbleMenuButton.h> +//#import "MCCornersRoundViewController.h" +#import "LMJSettingCell.h" +//#import "MCSphereTagCloudViewController.h" +//#import "MCLocalHTMLViewController.h" +@interface LMJCasesViewController () + +@end + +@implementation LMJCasesViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + self.title = @"������������"; + +} + + + +- (UIView *)lmjNavigationBarLeftView:(LMJNavigationBar *)navigationBar { + UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0.f, 0.f, 44, 44)]; + + label.text = @"Tap"; + label.textColor = [UIColor whiteColor]; + label.textAlignment = NSTextAlignmentCenter; + label.layer.cornerRadius = label.frame.size.height / 2.f; + label.backgroundColor =[UIColor colorWithRed:0.f green:0.f blue:0.f alpha:0.5f]; + label.clipsToBounds = YES; + + DWBubbleMenuButton *bubbleMenuButton = [[DWBubbleMenuButton alloc] initWithFrame:CGRectMake(0, 0, 44, 44) expansionDirection:DirectionRight]; + bubbleMenuButton.homeButtonView = label; + + [bubbleMenuButton addButtons:[self createDemoButtonArray]]; + + return bubbleMenuButton; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + [super tableView:tableView cellForRowAtIndexPath:indexPath]; + LMJWordItem *item = self.sections[indexPath.section].items[indexPath.row]; + + LMJSettingCell *cell = [LMJSettingCell cellWithTableView:tableView andCellStyle:UITableViewCellStyleSubtitle]; + + cell.item = item; + + return cell; +} + + +- (NSArray *)createDemoButtonArray { + NSMutableArray *buttonsMutable = [[NSMutableArray alloc] init]; + + int i = 0; + for (NSString *title in @[@"A", @"B", @"C", @"D", @"E", @"F"]) { + UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem]; + + [button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; + [button setTitle:title forState:UIControlStateNormal]; + + button.frame = CGRectMake(0.f, 0.f, 30.f, 30.f); + button.layer.cornerRadius = button.frame.size.height / 2.f; + button.backgroundColor = [UIColor colorWithRed:0.f green:0.f blue:0.f alpha:0.5f]; + button.clipsToBounds = YES; + button.tag = i++; + + [button addTarget:self action:@selector(test:) forControlEvents:UIControlEventTouchUpInside]; + + [buttonsMutable addObject:button]; + } + + return buttonsMutable; +} + +- (void)test:(UIButton *)sender { + NSLog(@"Button tapped, tag: %ld", (long)sender.tag); +} + +- (UIView *)lmjNavigationBarTitleView:(LMJNavigationBar *)navigationBar { + UILabel *label = [[UILabel alloc] init]; + + label.text = @"������������titleView"; + label.textColor = [UIColor blackColor]; + label.textAlignment = NSTextAlignmentCenter; + [label sizeToFit]; + label.height = 44; + + return label; +} + + +- (void)rightButtonEvent:(UIButton *)sender navigationBar:(LMJNavigationBar *)navigationBar { + + NSInteger count = [[sender titleForState:UIControlStateNormal] substringFromIndex:4].integerValue; + count += 1; + // ������ UIButton+LMJBlock, ������������������ + [sender setTitle:[NSString stringWithFormat:@"������������%zd", count] forState:UIControlStateNormal]; + + [sender sizeToFit]; + sender.height = 44; +} + +- (UIImage *)lmjNavigationBarRightButtonImage:(UIButton *)rightButton navigationBar:(LMJNavigationBar *)navigationBar { + + [rightButton setTitle:@"������������0" forState:UIControlStateNormal]; + [rightButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; + [rightButton sizeToFit]; + rightButton.height = 44; + return nil; +} + +@end -- Gitblit v1.8.0