├── README.md
├── LGIndexView
├── LGIndexView.xcodeproj
│ ├── xcuserdata
│ │ └── withpath.xcuserdatad
│ │ │ ├── xcdebugger
│ │ │ └── Breakpoints_v2.xcbkptlist
│ │ │ └── xcschemes
│ │ │ ├── xcschememanagement.plist
│ │ │ └── LGIndexView.xcscheme
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── withpath.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── project.pbxproj
├── LGIndexView
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── LGUIView.h
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ ├── AppDelegate.m
│ ├── ViewController.m
│ └── LGUIView.m
├── LGIndexViewTests
│ ├── Info.plist
│ └── LGIndexViewTests.m
└── LGIndexViewUITests
│ ├── Info.plist
│ └── LGIndexViewUITests.m
└── .gitignore
/README.md:
--------------------------------------------------------------------------------
1 | # LGIndexView
2 | 一个好玩的索引
3 | 手势滑动索引弧形动画小demo
4 |
5 |
6 | 很久以前写着玩的,上面的小控件没有做重用处理,代码也很挫,请慎重使用.
7 |
--------------------------------------------------------------------------------
/LGIndexView/LGIndexView.xcodeproj/xcuserdata/withpath.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/LGIndexView/LGIndexView.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/LGIndexView/LGIndexView.xcodeproj/project.xcworkspace/xcuserdata/withpath.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LiuGanQQQ/LGIndexView/HEAD/LGIndexView/LGIndexView.xcodeproj/project.xcworkspace/xcuserdata/withpath.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/LGIndexView/LGIndexView/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // LGIndexView
4 | //
5 | // Created by 雨逍 on 2016/12/3.
6 | // Copyright © 2016年 刘干. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 | @end
14 |
15 |
--------------------------------------------------------------------------------
/LGIndexView/LGIndexView/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // LGIndexView
4 | //
5 | // Created by 雨逍 on 2016/12/3.
6 | // Copyright © 2016年 刘干. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/LGIndexView/LGIndexView/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // LGIndexView
4 | //
5 | // Created by 雨逍 on 2016/12/3.
6 | // Copyright © 2016年 刘干. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/LGIndexView/LGIndexViewTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/LGIndexView/LGIndexViewUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/LGIndexView/LGIndexView.xcodeproj/xcuserdata/withpath.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | LGIndexView.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | D43F820F1DF25969005CB4CF
16 |
17 | primary
18 |
19 |
20 | D43F82281DF2596A005CB4CF
21 |
22 | primary
23 |
24 |
25 | D43F82331DF2596A005CB4CF
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/LGIndexView/LGIndexViewTests/LGIndexViewTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // LGIndexViewTests.m
3 | // LGIndexViewTests
4 | //
5 | // Created by 雨逍 on 2016/12/3.
6 | // Copyright © 2016年 刘干. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface LGIndexViewTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation LGIndexViewTests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/LGIndexView/LGIndexView/LGUIView.h:
--------------------------------------------------------------------------------
1 | //
2 | // LGUIView.h
3 | // LGIndexView
4 | //
5 | // Created by 雨逍 on 2016/12/5.
6 | // Copyright © 2016年 刘干. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //字体变化率
12 | #define FONT_RATE 1/8.000
13 | //透明度变化率
14 | #define ALPHA_RATE 1/80.0000
15 | //初始状态索引颜色
16 | #define STR_COLOR [UIColor orangeColor]
17 | //选中状态索引颜色
18 | #define MARK_COLOR [UIColor blackColor]
19 | //初始状态索引大小
20 | #define FONT_SIZE [UIFont systemFontOfSize:10]
21 | //索引label的tag值(防止冲突)
22 | #define TAG 233333
23 | //圆的半径
24 | #define ANIMATION_HEIGHT 80
25 |
26 | typedef void (^MyBlock)(NSInteger);
27 |
28 | @interface LGUIView : UIView
29 | //动画视图(可自定义)
30 | @property (nonatomic,strong) UILabel * animationLabel;
31 | //索引数组
32 | @property (nonatomic,strong) NSArray * indexArray;
33 | //滑动回调block
34 | @property (nonatomic,copy) MyBlock selectedBlock;
35 | //初始数值(计算用到)
36 | @property (nonatomic,unsafe_unretained) CGFloat number;
37 | /**
38 | * index滑动反馈
39 | */
40 | -(void)selectIndexBlock:(MyBlock)block;
41 |
42 | /**
43 | * 初始化
44 | */
45 | - (instancetype)initWithFrame:(CGRect)frame indexArray:(NSArray *)array;
46 |
47 | @end
48 |
--------------------------------------------------------------------------------
/LGIndexView/LGIndexViewUITests/LGIndexViewUITests.m:
--------------------------------------------------------------------------------
1 | //
2 | // LGIndexViewUITests.m
3 | // LGIndexViewUITests
4 | //
5 | // Created by 雨逍 on 2016/12/3.
6 | // Copyright © 2016年 刘干. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface LGIndexViewUITests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation LGIndexViewUITests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 |
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 |
22 | // In UI tests it is usually best to stop immediately when a failure occurs.
23 | self.continueAfterFailure = NO;
24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
25 | [[[XCUIApplication alloc] init] launch];
26 |
27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
28 | }
29 |
30 | - (void)tearDown {
31 | // Put teardown code here. This method is called after the invocation of each test method in the class.
32 | [super tearDown];
33 | }
34 |
35 | - (void)testExample {
36 | // Use recording to get started writing UI tests.
37 | // Use XCTAssert and related functions to verify your tests produce the correct results.
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/LGIndexView/LGIndexView/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## Build generated
6 | build/
7 | DerivedData/
8 |
9 | ## Various settings
10 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata/
19 |
20 | ## Other
21 | *.moved-aside
22 | *.xcuserstate
23 |
24 | ## Obj-C/Swift specific
25 | *.hmap
26 | *.ipa
27 | *.dSYM.zip
28 | *.dSYM
29 |
30 | # CocoaPods
31 | #
32 | # We recommend against adding the Pods directory to your .gitignore. However
33 | # you should judge for yourself, the pros and cons are mentioned at:
34 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
35 | #
36 | # Pods/
37 |
38 | # Carthage
39 | #
40 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
41 | # Carthage/Checkouts
42 |
43 | Carthage/Build
44 |
45 | # fastlane
46 | #
47 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
48 | # screenshots whenever they are needed.
49 | # For more information about the recommended setup visit:
50 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
51 |
52 | fastlane/report.xml
53 | fastlane/screenshots
54 |
55 | #Code Injection
56 | #
57 | # After new code Injection tools there's a generated folder /iOSInjectionProject
58 | # https://github.com/johnno1962/injectionforxcode
59 |
60 | iOSInjectionProject/
61 |
--------------------------------------------------------------------------------
/LGIndexView/LGIndexView/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/LGIndexView/LGIndexView/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/LGIndexView/LGIndexView/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/LGIndexView/LGIndexView/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // LGIndexView
4 | //
5 | // Created by 雨逍 on 2016/12/3.
6 | // Copyright © 2016年 刘干. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 | return YES;
21 | }
22 |
23 |
24 | - (void)applicationWillResignActive:(UIApplication *)application {
25 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
27 | }
28 |
29 |
30 | - (void)applicationDidEnterBackground:(UIApplication *)application {
31 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
33 | }
34 |
35 |
36 | - (void)applicationWillEnterForeground:(UIApplication *)application {
37 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
38 | }
39 |
40 |
41 | - (void)applicationDidBecomeActive:(UIApplication *)application {
42 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
43 | }
44 |
45 |
46 | - (void)applicationWillTerminate:(UIApplication *)application {
47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
48 | }
49 |
50 |
51 | @end
52 |
--------------------------------------------------------------------------------
/LGIndexView/LGIndexView/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // LGIndexView
4 | //
5 | // Created by 雨逍 on 2016/12/3.
6 | // Copyright © 2016年 刘干. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "LGUIView.h"
11 |
12 | #define WIDTH [UIScreen mainScreen].bounds.size.width
13 | #define HEIGHT [UIScreen mainScreen].bounds.size.height
14 |
15 | @interface ViewController ()
16 | {
17 | LGUIView * lgView;
18 | UITableView * _tableView;
19 | }
20 |
21 | @end
22 |
23 | @implementation ViewController
24 |
25 | - (void)viewDidLoad
26 | {
27 | [super viewDidLoad];
28 | // Do any additional setup after loading the view, typically from a nib.
29 |
30 | self.view.backgroundColor = [UIColor whiteColor];
31 |
32 | [self creatTableView];
33 | [self creatLGView];
34 | }
35 |
36 | -(void)creatTableView
37 | {
38 | _tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 64, WIDTH - 40, HEIGHT - 64) style:UITableViewStylePlain];
39 | _tableView.delegate = self;
40 | _tableView.dataSource = self;
41 | _tableView.showsVerticalScrollIndicator = NO;
42 | _tableView.showsHorizontalScrollIndicator = NO;
43 | [self.view addSubview:_tableView];
44 |
45 | }
46 |
47 | -(void)creatLGView
48 | {
49 | NSMutableArray * arr = [NSMutableArray new];
50 | for (int i = 0; i < 26; i ++)
51 | {
52 | unichar ch = 65 + i;
53 | NSString * str = [NSString stringWithUTF8String:(char *)&ch];
54 | [arr addObject:str];
55 | }
56 |
57 | lgView = [[LGUIView alloc]initWithFrame:CGRectMake(WIDTH - 40, 100, 40, HEIGHT - 140) indexArray:arr];
58 | [self.view addSubview:lgView];
59 |
60 | [lgView selectIndexBlock:^(NSInteger section)
61 | {
62 | [_tableView selectRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:section]
63 | animated:NO
64 | scrollPosition:UITableViewScrollPositionTop];
65 | }];
66 | }
67 |
68 | -(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
69 | {
70 | unichar ch = 65 + section;
71 | NSString * str = [NSString stringWithUTF8String:(char *)&ch];
72 | return str;
73 | }
74 |
75 | -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
76 | {
77 | return 26;
78 | }
79 |
80 | -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
81 | {
82 | return 4;
83 | }
84 |
85 | -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
86 | {
87 | static NSString * cellID = @"cellID";
88 | UITableViewCell * cell = [_tableView dequeueReusableCellWithIdentifier:cellID];
89 | if (!cell)
90 | {
91 | cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
92 | cell.selectionStyle =UITableViewCellSelectionStyleNone;
93 | }
94 |
95 | cell.textLabel.text = [NSString stringWithFormat:@"%ld",indexPath.row];
96 | cell.textLabel.textColor = [UIColor colorWithRed:35/255.0 green:94/255.0 blue:44/255.0 alpha:1.0];
97 |
98 | return cell;
99 | }
100 |
101 | - (void)didReceiveMemoryWarning
102 | {
103 | [super didReceiveMemoryWarning];
104 | // Dispose of any resources that can be recreated.
105 | }
106 |
107 |
108 | @end
109 |
--------------------------------------------------------------------------------
/LGIndexView/LGIndexView.xcodeproj/xcuserdata/withpath.xcuserdatad/xcschemes/LGIndexView.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
43 |
49 |
50 |
51 |
52 |
53 |
59 |
60 |
61 |
62 |
63 |
64 |
74 |
76 |
82 |
83 |
84 |
85 |
86 |
87 |
93 |
95 |
101 |
102 |
103 |
104 |
106 |
107 |
110 |
111 |
112 |
--------------------------------------------------------------------------------
/LGIndexView/LGIndexView/LGUIView.m:
--------------------------------------------------------------------------------
1 | //
2 | // LGUIView.m
3 | // LGIndexView
4 | //
5 | // Created by 雨逍 on 2016/12/5.
6 | // Copyright © 2016年 刘干. All rights reserved.
7 | //
8 |
9 | #import "LGUIView.h"
10 |
11 | #define WIDTH [UIScreen mainScreen].bounds.size.width
12 | #define HEIGHT [UIScreen mainScreen].bounds.size.height
13 |
14 | @implementation LGUIView
15 |
16 | /*
17 | // Only override drawRect: if you perform custom drawing.
18 | // An empty implementation adversely affects performance during animation.
19 | - (void)drawRect:(CGRect)rect {
20 | // Drawing code
21 | }
22 | */
23 |
24 | #pragma mark *********************************************** initWithFrame ***********************************************
25 |
26 | - (instancetype)initWithFrame:(CGRect)frame indexArray:(NSArray *)array
27 | {
28 | self = [super initWithFrame:frame];
29 |
30 | if (self)
31 | {
32 | self.indexArray = [NSArray arrayWithArray:array];
33 |
34 | CGFloat hh = self.frame.size.height/self.indexArray.count;
35 |
36 | for (int i = 0; i < array.count; i ++)
37 | {
38 | UILabel * label = [[UILabel alloc]initWithFrame:CGRectMake(0, i * hh, self.frame.size.width, hh)];
39 | label.text = self.indexArray[i];
40 | label.tag = TAG + i;
41 | label.textAlignment = NSTextAlignmentCenter;
42 | label.textColor = STR_COLOR;
43 | label.font = FONT_SIZE;
44 | [self addSubview:label];
45 |
46 | _number = label.font.pointSize;
47 | }
48 |
49 | [self addSubview:self.animationLabel];
50 | }
51 |
52 | return self;
53 | }
54 |
55 | #pragma mark *********************************************** 懒加载 ***********************************************
56 |
57 | -(UILabel *)animationLabel
58 | {
59 | if (!_animationLabel)
60 | {
61 | _animationLabel = [[UILabel alloc]initWithFrame:CGRectMake(-WIDTH/2 + self.frame.size.width/2, 100, 60, 60)];
62 | _animationLabel.layer.masksToBounds = YES;
63 | _animationLabel.layer.cornerRadius = 5.0f;
64 | _animationLabel.backgroundColor = [UIColor orangeColor];
65 | _animationLabel.textColor = [UIColor whiteColor];
66 | _animationLabel.alpha = 0;
67 | _animationLabel.textAlignment = NSTextAlignmentCenter;
68 | _animationLabel.font = [UIFont systemFontOfSize:18];
69 | }
70 |
71 | return _animationLabel;
72 | }
73 |
74 | #pragma mark *********************************************** AnimationWithSection ***********************************************
75 |
76 | -(void)animationWithSection:(NSInteger)section
77 | {
78 | self.selectedBlock(section);
79 |
80 | _animationLabel.text = self.indexArray[section];
81 | _animationLabel.alpha = 1.0;
82 | }
83 |
84 | #pragma mark *********************************************** PanAnimationFinish ***********************************************
85 |
86 | -(void)panAnimationFinish
87 | {
88 | CGFloat hh = self.frame.size.height/self.indexArray.count;
89 |
90 | for (int i = 0; i < self.indexArray.count; i ++)
91 | {
92 | UILabel * label = (UILabel *)[self viewWithTag:TAG + i];
93 |
94 | [UIView animateWithDuration:0.2 animations:^{
95 |
96 | label.center = CGPointMake(self.frame.size.width/2, i * hh + hh/2);
97 | label.font = FONT_SIZE;
98 | label.alpha = 1.0;
99 | label.textColor = STR_COLOR;
100 | }];
101 | }
102 |
103 | [UIView animateWithDuration:1 animations:^{
104 |
105 | self.animationLabel.alpha = 0;
106 |
107 | }];
108 | }
109 |
110 | #pragma mark *********************************************** PanAnimationBegin ***********************************************
111 |
112 | -(void)panAnimationBeginWithToucher:(NSSet *)touches
113 | {
114 | UITouch * touch = [touches anyObject];
115 | CGPoint point = [touch locationInView:self];
116 | CGFloat hh = self.frame.size.height/self.indexArray.count;
117 |
118 | for (int i = 0; i < self.indexArray.count; i ++)
119 | {
120 | UILabel * label = (UILabel *)[self viewWithTag:TAG + i];
121 | if (fabs(label.center.y - point.y) <= ANIMATION_HEIGHT)
122 | {
123 | [UIView animateWithDuration:0.2 animations:^{
124 |
125 | label.center = CGPointMake(label.bounds.size.width/2 - sqrt(fabs(ANIMATION_HEIGHT * ANIMATION_HEIGHT - fabs(label.center.y - point.y) * fabs(label.center.y - point.y))), label.center.y);
126 |
127 | label.font = [UIFont systemFontOfSize:_number + (ANIMATION_HEIGHT - fabs(label.center.y - point.y)) * FONT_RATE];
128 |
129 | if (fabs(label.center.y - point.y) * ALPHA_RATE <= 0.08)
130 | {
131 | label.textColor = MARK_COLOR;
132 | label.alpha = 1.0;
133 |
134 | [self animationWithSection:i];
135 |
136 | for (int j = 0; j < self.indexArray.count; j ++)
137 | {
138 | UILabel * label = (UILabel *)[self viewWithTag:TAG + j];
139 | if (i != j)
140 | {
141 | label.textColor = STR_COLOR;
142 | label.alpha = fabs(label.center.y - point.y) * ALPHA_RATE;
143 | }
144 | }
145 | }
146 | }];
147 |
148 | }else
149 | {
150 | [UIView animateWithDuration:0.2 animations:^
151 | {
152 | label.center = CGPointMake(self.frame.size.width/2, i * hh + hh/2);
153 | label.font = FONT_SIZE;
154 | label.alpha = 1.0;
155 | }];
156 | }
157 | }
158 | }
159 |
160 |
161 | #pragma mark *********************************************** UIResponder ***********************************************
162 |
163 | -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
164 | {
165 | [self panAnimationBeginWithToucher:touches];
166 | }
167 |
168 | -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
169 | {
170 | [self panAnimationBeginWithToucher:touches];
171 | }
172 |
173 | -(void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event
174 | {
175 | [self panAnimationFinish];
176 | }
177 |
178 | -(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
179 | {
180 | [self panAnimationFinish];
181 | }
182 |
183 | #pragma mark *********************************************** reloadVoice ***********************************************
184 |
185 | -(void)selectIndexBlock:(MyBlock)block
186 | {
187 | self.selectedBlock = block;
188 | }
189 |
190 | #pragma mark *********************************************** dealloc ***********************************************
191 |
192 | -(void)dealloc
193 | {
194 | self.animationLabel = nil;
195 | self.indexArray = nil;
196 | self.selectedBlock = nil;
197 | }
198 |
199 | @end
200 |
--------------------------------------------------------------------------------
/LGIndexView/LGIndexView.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | D43F82151DF25969005CB4CF /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D43F82141DF25969005CB4CF /* main.m */; };
11 | D43F82181DF25969005CB4CF /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = D43F82171DF25969005CB4CF /* AppDelegate.m */; };
12 | D43F821B1DF2596A005CB4CF /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D43F821A1DF2596A005CB4CF /* ViewController.m */; };
13 | D43F821E1DF2596A005CB4CF /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D43F821C1DF2596A005CB4CF /* Main.storyboard */; };
14 | D43F82201DF2596A005CB4CF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D43F821F1DF2596A005CB4CF /* Assets.xcassets */; };
15 | D43F82231DF2596A005CB4CF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D43F82211DF2596A005CB4CF /* LaunchScreen.storyboard */; };
16 | D43F822E1DF2596A005CB4CF /* LGIndexViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D43F822D1DF2596A005CB4CF /* LGIndexViewTests.m */; };
17 | D43F82391DF2596A005CB4CF /* LGIndexViewUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = D43F82381DF2596A005CB4CF /* LGIndexViewUITests.m */; };
18 | D4A10FB01DF534D0002FD468 /* LGUIView.m in Sources */ = {isa = PBXBuildFile; fileRef = D4A10FAF1DF534D0002FD468 /* LGUIView.m */; };
19 | /* End PBXBuildFile section */
20 |
21 | /* Begin PBXContainerItemProxy section */
22 | D43F822A1DF2596A005CB4CF /* PBXContainerItemProxy */ = {
23 | isa = PBXContainerItemProxy;
24 | containerPortal = D43F82081DF25968005CB4CF /* Project object */;
25 | proxyType = 1;
26 | remoteGlobalIDString = D43F820F1DF25969005CB4CF;
27 | remoteInfo = LGIndexView;
28 | };
29 | D43F82351DF2596A005CB4CF /* PBXContainerItemProxy */ = {
30 | isa = PBXContainerItemProxy;
31 | containerPortal = D43F82081DF25968005CB4CF /* Project object */;
32 | proxyType = 1;
33 | remoteGlobalIDString = D43F820F1DF25969005CB4CF;
34 | remoteInfo = LGIndexView;
35 | };
36 | /* End PBXContainerItemProxy section */
37 |
38 | /* Begin PBXFileReference section */
39 | D43F82101DF25969005CB4CF /* LGIndexView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LGIndexView.app; sourceTree = BUILT_PRODUCTS_DIR; };
40 | D43F82141DF25969005CB4CF /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
41 | D43F82161DF25969005CB4CF /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
42 | D43F82171DF25969005CB4CF /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
43 | D43F82191DF25969005CB4CF /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
44 | D43F821A1DF2596A005CB4CF /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
45 | D43F821D1DF2596A005CB4CF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
46 | D43F821F1DF2596A005CB4CF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
47 | D43F82221DF2596A005CB4CF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
48 | D43F82241DF2596A005CB4CF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
49 | D43F82291DF2596A005CB4CF /* LGIndexViewTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LGIndexViewTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
50 | D43F822D1DF2596A005CB4CF /* LGIndexViewTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LGIndexViewTests.m; sourceTree = ""; };
51 | D43F822F1DF2596A005CB4CF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
52 | D43F82341DF2596A005CB4CF /* LGIndexViewUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LGIndexViewUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
53 | D43F82381DF2596A005CB4CF /* LGIndexViewUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LGIndexViewUITests.m; sourceTree = ""; };
54 | D43F823A1DF2596A005CB4CF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
55 | D4A10FAE1DF534D0002FD468 /* LGUIView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LGUIView.h; sourceTree = ""; };
56 | D4A10FAF1DF534D0002FD468 /* LGUIView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LGUIView.m; sourceTree = ""; };
57 | /* End PBXFileReference section */
58 |
59 | /* Begin PBXFrameworksBuildPhase section */
60 | D43F820D1DF25969005CB4CF /* Frameworks */ = {
61 | isa = PBXFrameworksBuildPhase;
62 | buildActionMask = 2147483647;
63 | files = (
64 | );
65 | runOnlyForDeploymentPostprocessing = 0;
66 | };
67 | D43F82261DF2596A005CB4CF /* Frameworks */ = {
68 | isa = PBXFrameworksBuildPhase;
69 | buildActionMask = 2147483647;
70 | files = (
71 | );
72 | runOnlyForDeploymentPostprocessing = 0;
73 | };
74 | D43F82311DF2596A005CB4CF /* Frameworks */ = {
75 | isa = PBXFrameworksBuildPhase;
76 | buildActionMask = 2147483647;
77 | files = (
78 | );
79 | runOnlyForDeploymentPostprocessing = 0;
80 | };
81 | /* End PBXFrameworksBuildPhase section */
82 |
83 | /* Begin PBXGroup section */
84 | D43F82071DF25968005CB4CF = {
85 | isa = PBXGroup;
86 | children = (
87 | D43F82121DF25969005CB4CF /* LGIndexView */,
88 | D43F822C1DF2596A005CB4CF /* LGIndexViewTests */,
89 | D43F82371DF2596A005CB4CF /* LGIndexViewUITests */,
90 | D43F82111DF25969005CB4CF /* Products */,
91 | );
92 | sourceTree = "";
93 | };
94 | D43F82111DF25969005CB4CF /* Products */ = {
95 | isa = PBXGroup;
96 | children = (
97 | D43F82101DF25969005CB4CF /* LGIndexView.app */,
98 | D43F82291DF2596A005CB4CF /* LGIndexViewTests.xctest */,
99 | D43F82341DF2596A005CB4CF /* LGIndexViewUITests.xctest */,
100 | );
101 | name = Products;
102 | sourceTree = "";
103 | };
104 | D43F82121DF25969005CB4CF /* LGIndexView */ = {
105 | isa = PBXGroup;
106 | children = (
107 | D43F82161DF25969005CB4CF /* AppDelegate.h */,
108 | D43F82171DF25969005CB4CF /* AppDelegate.m */,
109 | D43F82191DF25969005CB4CF /* ViewController.h */,
110 | D43F821A1DF2596A005CB4CF /* ViewController.m */,
111 | D4A10FAE1DF534D0002FD468 /* LGUIView.h */,
112 | D4A10FAF1DF534D0002FD468 /* LGUIView.m */,
113 | D43F821C1DF2596A005CB4CF /* Main.storyboard */,
114 | D43F821F1DF2596A005CB4CF /* Assets.xcassets */,
115 | D43F82211DF2596A005CB4CF /* LaunchScreen.storyboard */,
116 | D43F82241DF2596A005CB4CF /* Info.plist */,
117 | D43F82131DF25969005CB4CF /* Supporting Files */,
118 | );
119 | path = LGIndexView;
120 | sourceTree = "";
121 | };
122 | D43F82131DF25969005CB4CF /* Supporting Files */ = {
123 | isa = PBXGroup;
124 | children = (
125 | D43F82141DF25969005CB4CF /* main.m */,
126 | );
127 | name = "Supporting Files";
128 | sourceTree = "";
129 | };
130 | D43F822C1DF2596A005CB4CF /* LGIndexViewTests */ = {
131 | isa = PBXGroup;
132 | children = (
133 | D43F822D1DF2596A005CB4CF /* LGIndexViewTests.m */,
134 | D43F822F1DF2596A005CB4CF /* Info.plist */,
135 | );
136 | path = LGIndexViewTests;
137 | sourceTree = "";
138 | };
139 | D43F82371DF2596A005CB4CF /* LGIndexViewUITests */ = {
140 | isa = PBXGroup;
141 | children = (
142 | D43F82381DF2596A005CB4CF /* LGIndexViewUITests.m */,
143 | D43F823A1DF2596A005CB4CF /* Info.plist */,
144 | );
145 | path = LGIndexViewUITests;
146 | sourceTree = "";
147 | };
148 | /* End PBXGroup section */
149 |
150 | /* Begin PBXNativeTarget section */
151 | D43F820F1DF25969005CB4CF /* LGIndexView */ = {
152 | isa = PBXNativeTarget;
153 | buildConfigurationList = D43F823D1DF2596A005CB4CF /* Build configuration list for PBXNativeTarget "LGIndexView" */;
154 | buildPhases = (
155 | D43F820C1DF25969005CB4CF /* Sources */,
156 | D43F820D1DF25969005CB4CF /* Frameworks */,
157 | D43F820E1DF25969005CB4CF /* Resources */,
158 | );
159 | buildRules = (
160 | );
161 | dependencies = (
162 | );
163 | name = LGIndexView;
164 | productName = LGIndexView;
165 | productReference = D43F82101DF25969005CB4CF /* LGIndexView.app */;
166 | productType = "com.apple.product-type.application";
167 | };
168 | D43F82281DF2596A005CB4CF /* LGIndexViewTests */ = {
169 | isa = PBXNativeTarget;
170 | buildConfigurationList = D43F82401DF2596A005CB4CF /* Build configuration list for PBXNativeTarget "LGIndexViewTests" */;
171 | buildPhases = (
172 | D43F82251DF2596A005CB4CF /* Sources */,
173 | D43F82261DF2596A005CB4CF /* Frameworks */,
174 | D43F82271DF2596A005CB4CF /* Resources */,
175 | );
176 | buildRules = (
177 | );
178 | dependencies = (
179 | D43F822B1DF2596A005CB4CF /* PBXTargetDependency */,
180 | );
181 | name = LGIndexViewTests;
182 | productName = LGIndexViewTests;
183 | productReference = D43F82291DF2596A005CB4CF /* LGIndexViewTests.xctest */;
184 | productType = "com.apple.product-type.bundle.unit-test";
185 | };
186 | D43F82331DF2596A005CB4CF /* LGIndexViewUITests */ = {
187 | isa = PBXNativeTarget;
188 | buildConfigurationList = D43F82431DF2596A005CB4CF /* Build configuration list for PBXNativeTarget "LGIndexViewUITests" */;
189 | buildPhases = (
190 | D43F82301DF2596A005CB4CF /* Sources */,
191 | D43F82311DF2596A005CB4CF /* Frameworks */,
192 | D43F82321DF2596A005CB4CF /* Resources */,
193 | );
194 | buildRules = (
195 | );
196 | dependencies = (
197 | D43F82361DF2596A005CB4CF /* PBXTargetDependency */,
198 | );
199 | name = LGIndexViewUITests;
200 | productName = LGIndexViewUITests;
201 | productReference = D43F82341DF2596A005CB4CF /* LGIndexViewUITests.xctest */;
202 | productType = "com.apple.product-type.bundle.ui-testing";
203 | };
204 | /* End PBXNativeTarget section */
205 |
206 | /* Begin PBXProject section */
207 | D43F82081DF25968005CB4CF /* Project object */ = {
208 | isa = PBXProject;
209 | attributes = {
210 | LastUpgradeCheck = 0810;
211 | ORGANIZATIONNAME = "刘干";
212 | TargetAttributes = {
213 | D43F820F1DF25969005CB4CF = {
214 | CreatedOnToolsVersion = 8.1;
215 | DevelopmentTeam = Z83468T5HS;
216 | ProvisioningStyle = Automatic;
217 | };
218 | D43F82281DF2596A005CB4CF = {
219 | CreatedOnToolsVersion = 8.1;
220 | DevelopmentTeam = Z83468T5HS;
221 | ProvisioningStyle = Automatic;
222 | TestTargetID = D43F820F1DF25969005CB4CF;
223 | };
224 | D43F82331DF2596A005CB4CF = {
225 | CreatedOnToolsVersion = 8.1;
226 | DevelopmentTeam = Z83468T5HS;
227 | ProvisioningStyle = Automatic;
228 | TestTargetID = D43F820F1DF25969005CB4CF;
229 | };
230 | };
231 | };
232 | buildConfigurationList = D43F820B1DF25968005CB4CF /* Build configuration list for PBXProject "LGIndexView" */;
233 | compatibilityVersion = "Xcode 3.2";
234 | developmentRegion = English;
235 | hasScannedForEncodings = 0;
236 | knownRegions = (
237 | en,
238 | Base,
239 | );
240 | mainGroup = D43F82071DF25968005CB4CF;
241 | productRefGroup = D43F82111DF25969005CB4CF /* Products */;
242 | projectDirPath = "";
243 | projectRoot = "";
244 | targets = (
245 | D43F820F1DF25969005CB4CF /* LGIndexView */,
246 | D43F82281DF2596A005CB4CF /* LGIndexViewTests */,
247 | D43F82331DF2596A005CB4CF /* LGIndexViewUITests */,
248 | );
249 | };
250 | /* End PBXProject section */
251 |
252 | /* Begin PBXResourcesBuildPhase section */
253 | D43F820E1DF25969005CB4CF /* Resources */ = {
254 | isa = PBXResourcesBuildPhase;
255 | buildActionMask = 2147483647;
256 | files = (
257 | D43F82231DF2596A005CB4CF /* LaunchScreen.storyboard in Resources */,
258 | D43F82201DF2596A005CB4CF /* Assets.xcassets in Resources */,
259 | D43F821E1DF2596A005CB4CF /* Main.storyboard in Resources */,
260 | );
261 | runOnlyForDeploymentPostprocessing = 0;
262 | };
263 | D43F82271DF2596A005CB4CF /* Resources */ = {
264 | isa = PBXResourcesBuildPhase;
265 | buildActionMask = 2147483647;
266 | files = (
267 | );
268 | runOnlyForDeploymentPostprocessing = 0;
269 | };
270 | D43F82321DF2596A005CB4CF /* Resources */ = {
271 | isa = PBXResourcesBuildPhase;
272 | buildActionMask = 2147483647;
273 | files = (
274 | );
275 | runOnlyForDeploymentPostprocessing = 0;
276 | };
277 | /* End PBXResourcesBuildPhase section */
278 |
279 | /* Begin PBXSourcesBuildPhase section */
280 | D43F820C1DF25969005CB4CF /* Sources */ = {
281 | isa = PBXSourcesBuildPhase;
282 | buildActionMask = 2147483647;
283 | files = (
284 | D43F821B1DF2596A005CB4CF /* ViewController.m in Sources */,
285 | D43F82181DF25969005CB4CF /* AppDelegate.m in Sources */,
286 | D4A10FB01DF534D0002FD468 /* LGUIView.m in Sources */,
287 | D43F82151DF25969005CB4CF /* main.m in Sources */,
288 | );
289 | runOnlyForDeploymentPostprocessing = 0;
290 | };
291 | D43F82251DF2596A005CB4CF /* Sources */ = {
292 | isa = PBXSourcesBuildPhase;
293 | buildActionMask = 2147483647;
294 | files = (
295 | D43F822E1DF2596A005CB4CF /* LGIndexViewTests.m in Sources */,
296 | );
297 | runOnlyForDeploymentPostprocessing = 0;
298 | };
299 | D43F82301DF2596A005CB4CF /* Sources */ = {
300 | isa = PBXSourcesBuildPhase;
301 | buildActionMask = 2147483647;
302 | files = (
303 | D43F82391DF2596A005CB4CF /* LGIndexViewUITests.m in Sources */,
304 | );
305 | runOnlyForDeploymentPostprocessing = 0;
306 | };
307 | /* End PBXSourcesBuildPhase section */
308 |
309 | /* Begin PBXTargetDependency section */
310 | D43F822B1DF2596A005CB4CF /* PBXTargetDependency */ = {
311 | isa = PBXTargetDependency;
312 | target = D43F820F1DF25969005CB4CF /* LGIndexView */;
313 | targetProxy = D43F822A1DF2596A005CB4CF /* PBXContainerItemProxy */;
314 | };
315 | D43F82361DF2596A005CB4CF /* PBXTargetDependency */ = {
316 | isa = PBXTargetDependency;
317 | target = D43F820F1DF25969005CB4CF /* LGIndexView */;
318 | targetProxy = D43F82351DF2596A005CB4CF /* PBXContainerItemProxy */;
319 | };
320 | /* End PBXTargetDependency section */
321 |
322 | /* Begin PBXVariantGroup section */
323 | D43F821C1DF2596A005CB4CF /* Main.storyboard */ = {
324 | isa = PBXVariantGroup;
325 | children = (
326 | D43F821D1DF2596A005CB4CF /* Base */,
327 | );
328 | name = Main.storyboard;
329 | sourceTree = "";
330 | };
331 | D43F82211DF2596A005CB4CF /* LaunchScreen.storyboard */ = {
332 | isa = PBXVariantGroup;
333 | children = (
334 | D43F82221DF2596A005CB4CF /* Base */,
335 | );
336 | name = LaunchScreen.storyboard;
337 | sourceTree = "";
338 | };
339 | /* End PBXVariantGroup section */
340 |
341 | /* Begin XCBuildConfiguration section */
342 | D43F823B1DF2596A005CB4CF /* Debug */ = {
343 | isa = XCBuildConfiguration;
344 | buildSettings = {
345 | ALWAYS_SEARCH_USER_PATHS = NO;
346 | CLANG_ANALYZER_NONNULL = YES;
347 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
348 | CLANG_CXX_LIBRARY = "libc++";
349 | CLANG_ENABLE_MODULES = YES;
350 | CLANG_ENABLE_OBJC_ARC = YES;
351 | CLANG_WARN_BOOL_CONVERSION = YES;
352 | CLANG_WARN_CONSTANT_CONVERSION = YES;
353 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
354 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
355 | CLANG_WARN_EMPTY_BODY = YES;
356 | CLANG_WARN_ENUM_CONVERSION = YES;
357 | CLANG_WARN_INFINITE_RECURSION = YES;
358 | CLANG_WARN_INT_CONVERSION = YES;
359 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
360 | CLANG_WARN_SUSPICIOUS_MOVES = YES;
361 | CLANG_WARN_UNREACHABLE_CODE = YES;
362 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
363 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
364 | COPY_PHASE_STRIP = NO;
365 | DEBUG_INFORMATION_FORMAT = dwarf;
366 | ENABLE_STRICT_OBJC_MSGSEND = YES;
367 | ENABLE_TESTABILITY = YES;
368 | GCC_C_LANGUAGE_STANDARD = gnu99;
369 | GCC_DYNAMIC_NO_PIC = NO;
370 | GCC_NO_COMMON_BLOCKS = YES;
371 | GCC_OPTIMIZATION_LEVEL = 0;
372 | GCC_PREPROCESSOR_DEFINITIONS = (
373 | "DEBUG=1",
374 | "$(inherited)",
375 | );
376 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
377 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
378 | GCC_WARN_UNDECLARED_SELECTOR = YES;
379 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
380 | GCC_WARN_UNUSED_FUNCTION = YES;
381 | GCC_WARN_UNUSED_VARIABLE = YES;
382 | IPHONEOS_DEPLOYMENT_TARGET = 10.1;
383 | MTL_ENABLE_DEBUG_INFO = YES;
384 | ONLY_ACTIVE_ARCH = YES;
385 | SDKROOT = iphoneos;
386 | TARGETED_DEVICE_FAMILY = "1,2";
387 | };
388 | name = Debug;
389 | };
390 | D43F823C1DF2596A005CB4CF /* Release */ = {
391 | isa = XCBuildConfiguration;
392 | buildSettings = {
393 | ALWAYS_SEARCH_USER_PATHS = NO;
394 | CLANG_ANALYZER_NONNULL = YES;
395 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
396 | CLANG_CXX_LIBRARY = "libc++";
397 | CLANG_ENABLE_MODULES = YES;
398 | CLANG_ENABLE_OBJC_ARC = YES;
399 | CLANG_WARN_BOOL_CONVERSION = YES;
400 | CLANG_WARN_CONSTANT_CONVERSION = YES;
401 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
402 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
403 | CLANG_WARN_EMPTY_BODY = YES;
404 | CLANG_WARN_ENUM_CONVERSION = YES;
405 | CLANG_WARN_INFINITE_RECURSION = YES;
406 | CLANG_WARN_INT_CONVERSION = YES;
407 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
408 | CLANG_WARN_SUSPICIOUS_MOVES = YES;
409 | CLANG_WARN_UNREACHABLE_CODE = YES;
410 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
411 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
412 | COPY_PHASE_STRIP = NO;
413 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
414 | ENABLE_NS_ASSERTIONS = NO;
415 | ENABLE_STRICT_OBJC_MSGSEND = YES;
416 | GCC_C_LANGUAGE_STANDARD = gnu99;
417 | GCC_NO_COMMON_BLOCKS = YES;
418 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
419 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
420 | GCC_WARN_UNDECLARED_SELECTOR = YES;
421 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
422 | GCC_WARN_UNUSED_FUNCTION = YES;
423 | GCC_WARN_UNUSED_VARIABLE = YES;
424 | IPHONEOS_DEPLOYMENT_TARGET = 10.1;
425 | MTL_ENABLE_DEBUG_INFO = NO;
426 | SDKROOT = iphoneos;
427 | TARGETED_DEVICE_FAMILY = "1,2";
428 | VALIDATE_PRODUCT = YES;
429 | };
430 | name = Release;
431 | };
432 | D43F823E1DF2596A005CB4CF /* Debug */ = {
433 | isa = XCBuildConfiguration;
434 | buildSettings = {
435 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
436 | DEVELOPMENT_TEAM = Z83468T5HS;
437 | INFOPLIST_FILE = LGIndexView/Info.plist;
438 | IPHONEOS_DEPLOYMENT_TARGET = 10.1;
439 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
440 | PRODUCT_BUNDLE_IDENTIFIER = com.yuxiao.playgame.LGIndexView;
441 | PRODUCT_NAME = "$(TARGET_NAME)";
442 | };
443 | name = Debug;
444 | };
445 | D43F823F1DF2596A005CB4CF /* Release */ = {
446 | isa = XCBuildConfiguration;
447 | buildSettings = {
448 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
449 | DEVELOPMENT_TEAM = Z83468T5HS;
450 | INFOPLIST_FILE = LGIndexView/Info.plist;
451 | IPHONEOS_DEPLOYMENT_TARGET = 10.1;
452 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
453 | PRODUCT_BUNDLE_IDENTIFIER = com.yuxiao.playgame.LGIndexView;
454 | PRODUCT_NAME = "$(TARGET_NAME)";
455 | };
456 | name = Release;
457 | };
458 | D43F82411DF2596A005CB4CF /* Debug */ = {
459 | isa = XCBuildConfiguration;
460 | buildSettings = {
461 | BUNDLE_LOADER = "$(TEST_HOST)";
462 | DEVELOPMENT_TEAM = Z83468T5HS;
463 | INFOPLIST_FILE = LGIndexViewTests/Info.plist;
464 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
465 | PRODUCT_BUNDLE_IDENTIFIER = com.yuxiao.playgame.LGIndexViewTests;
466 | PRODUCT_NAME = "$(TARGET_NAME)";
467 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/LGIndexView.app/LGIndexView";
468 | };
469 | name = Debug;
470 | };
471 | D43F82421DF2596A005CB4CF /* Release */ = {
472 | isa = XCBuildConfiguration;
473 | buildSettings = {
474 | BUNDLE_LOADER = "$(TEST_HOST)";
475 | DEVELOPMENT_TEAM = Z83468T5HS;
476 | INFOPLIST_FILE = LGIndexViewTests/Info.plist;
477 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
478 | PRODUCT_BUNDLE_IDENTIFIER = com.yuxiao.playgame.LGIndexViewTests;
479 | PRODUCT_NAME = "$(TARGET_NAME)";
480 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/LGIndexView.app/LGIndexView";
481 | };
482 | name = Release;
483 | };
484 | D43F82441DF2596A005CB4CF /* Debug */ = {
485 | isa = XCBuildConfiguration;
486 | buildSettings = {
487 | DEVELOPMENT_TEAM = Z83468T5HS;
488 | INFOPLIST_FILE = LGIndexViewUITests/Info.plist;
489 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
490 | PRODUCT_BUNDLE_IDENTIFIER = com.yuxiao.playgame.LGIndexViewUITests;
491 | PRODUCT_NAME = "$(TARGET_NAME)";
492 | TEST_TARGET_NAME = LGIndexView;
493 | };
494 | name = Debug;
495 | };
496 | D43F82451DF2596A005CB4CF /* Release */ = {
497 | isa = XCBuildConfiguration;
498 | buildSettings = {
499 | DEVELOPMENT_TEAM = Z83468T5HS;
500 | INFOPLIST_FILE = LGIndexViewUITests/Info.plist;
501 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
502 | PRODUCT_BUNDLE_IDENTIFIER = com.yuxiao.playgame.LGIndexViewUITests;
503 | PRODUCT_NAME = "$(TARGET_NAME)";
504 | TEST_TARGET_NAME = LGIndexView;
505 | };
506 | name = Release;
507 | };
508 | /* End XCBuildConfiguration section */
509 |
510 | /* Begin XCConfigurationList section */
511 | D43F820B1DF25968005CB4CF /* Build configuration list for PBXProject "LGIndexView" */ = {
512 | isa = XCConfigurationList;
513 | buildConfigurations = (
514 | D43F823B1DF2596A005CB4CF /* Debug */,
515 | D43F823C1DF2596A005CB4CF /* Release */,
516 | );
517 | defaultConfigurationIsVisible = 0;
518 | defaultConfigurationName = Release;
519 | };
520 | D43F823D1DF2596A005CB4CF /* Build configuration list for PBXNativeTarget "LGIndexView" */ = {
521 | isa = XCConfigurationList;
522 | buildConfigurations = (
523 | D43F823E1DF2596A005CB4CF /* Debug */,
524 | D43F823F1DF2596A005CB4CF /* Release */,
525 | );
526 | defaultConfigurationIsVisible = 0;
527 | defaultConfigurationName = Release;
528 | };
529 | D43F82401DF2596A005CB4CF /* Build configuration list for PBXNativeTarget "LGIndexViewTests" */ = {
530 | isa = XCConfigurationList;
531 | buildConfigurations = (
532 | D43F82411DF2596A005CB4CF /* Debug */,
533 | D43F82421DF2596A005CB4CF /* Release */,
534 | );
535 | defaultConfigurationIsVisible = 0;
536 | defaultConfigurationName = Release;
537 | };
538 | D43F82431DF2596A005CB4CF /* Build configuration list for PBXNativeTarget "LGIndexViewUITests" */ = {
539 | isa = XCConfigurationList;
540 | buildConfigurations = (
541 | D43F82441DF2596A005CB4CF /* Debug */,
542 | D43F82451DF2596A005CB4CF /* Release */,
543 | );
544 | defaultConfigurationIsVisible = 0;
545 | defaultConfigurationName = Release;
546 | };
547 | /* End XCConfigurationList section */
548 | };
549 | rootObject = D43F82081DF25968005CB4CF /* Project object */;
550 | }
551 |
--------------------------------------------------------------------------------