├── qwe
├── README.md
├── license
├── ScrButton.xcodeproj
├── xcuserdata
│ ├── koudaiwang.xcuserdatad
│ │ ├── xcdebugger
│ │ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ │ ├── xcschememanagement.plist
│ │ │ └── ScrButton.xcscheme
│ └── yihui.xcuserdatad
│ │ └── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── ScrButton.xcscheme
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcuserdata
│ │ └── yihui.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcshareddata
│ │ └── ScrButton.xccheckout
└── project.pbxproj
├── ScrButton
├── BiaoTableViewCell.h
├── ViewController.h
├── TableView.h
├── ScrButton.xcdatamodeld
│ ├── .xccurrentversion
│ └── ScrButton.xcdatamodel
│ │ └── contents
├── main.m
├── BiaoTableViewCell.m
├── ScrButton
│ ├── SliderScrollView.h
│ ├── SliderButtonView.h
│ ├── SliderScrollView.m
│ └── SliderButtonView.m
├── AppDelegate.h
├── TableView.m
├── Images.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Info.plist
├── ViewController.m
├── Base.lproj
│ ├── Main.storyboard
│ └── LaunchScreen.xib
├── BiaoTableViewCell.xib
└── AppDelegate.m
├── ScrButton.podspec
└── ScrButtonTests
├── Info.plist
└── ScrButtonTests.m
/qwe:
--------------------------------------------------------------------------------
1 | qeqw
2 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ScrButton
2 | 滑动按钮 加滑动视图效果
3 | eqw
4 |
--------------------------------------------------------------------------------
/license:
--------------------------------------------------------------------------------
1 | 123121212312121231212123121212312121231212123121212312121231212123121212312121231212
2 |
--------------------------------------------------------------------------------
/ScrButton.xcodeproj/xcuserdata/koudaiwang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/ScrButton.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ScrButton.xcodeproj/project.xcworkspace/xcuserdata/yihui.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/myafer/ScrButton/HEAD/ScrButton.xcodeproj/project.xcworkspace/xcuserdata/yihui.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/ScrButton/BiaoTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // BiaoTableViewCell.h
3 | // ScrButton
4 | //
5 | // Created by 口贷网 on 15/7/22.
6 | // Copyright (c) 2015年 Afer. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface BiaoTableViewCell : UITableViewCell
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/ScrButton/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // ScrButton
4 | //
5 | // Created by 口贷网 on 15/7/8.
6 | // Copyright (c) 2015年 Afer. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/ScrButton/TableView.h:
--------------------------------------------------------------------------------
1 | //
2 | // TableView.h
3 | // ScrButton
4 | //
5 | // Created by 口贷网 on 15/7/22.
6 | // Copyright (c) 2015年 Afer. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface TableView : UITableView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/ScrButton/ScrButton.xcdatamodeld/.xccurrentversion:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | _XCCurrentVersionName
6 | ScrButton.xcdatamodel
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ScrButton/ScrButton.xcdatamodeld/ScrButton.xcdatamodel/contents:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ScrButton/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // ScrButton
4 | //
5 | // Created by 口贷网 on 15/7/8.
6 | // Copyright (c) 2015年 Afer. 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 |
--------------------------------------------------------------------------------
/ScrButton/BiaoTableViewCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // BiaoTableViewCell.m
3 | // ScrButton
4 | //
5 | // Created by 口贷网 on 15/7/22.
6 | // Copyright (c) 2015年 Afer. All rights reserved.
7 | //
8 |
9 | #import "BiaoTableViewCell.h"
10 |
11 | @implementation BiaoTableViewCell
12 |
13 | - (void)awakeFromNib {
14 | // Initialization code
15 | }
16 |
17 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
18 | [super setSelected:selected animated:animated];
19 |
20 | // Configure the view for the selected state
21 | }
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/ScrButton/ScrButton/SliderScrollView.h:
--------------------------------------------------------------------------------
1 | //
2 | // SliderScrollView.h
3 | // ScrButton
4 | //
5 | // Created by 口贷网 on 15/7/8.
6 | // Copyright (c) 2015年 Afer. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef void(^Get_Index)(NSInteger index);
12 |
13 | @interface SliderScrollView : UIView
14 |
15 | @property (nonatomic, strong) UIScrollView *scr;
16 | @property (nonatomic, copy) Get_Index get_Index_Block;
17 |
18 | - (instancetype)initWithFrame:(CGRect)frame withViewArray:(NSArray *)viewArray;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/ScrButton.podspec:
--------------------------------------------------------------------------------
1 |
2 | Pod::Spec.new do |s|
3 |
4 | s.name = "ScrButton"
5 | s.platform = :ios
6 | s.ios.deployment_target = '7.0'
7 | s.version = "0.0.2"
8 | s.summary = "ScrButton"
9 | s.description = <<-DESC
10 | wwwwwwwww
11 | DESC
12 | s.homepage = "https://github.com/myafer"
13 | s.license = { :type => "MIT", :file => "license" }
14 | s.author = { "ScrButton" => "" }
15 | s.source = { :git => "https://github.com/myafer/ScrButton.git", :tag => "0.0.2" }
16 | s.source_files = "ScrButton", "ScrButton/**/*"
17 | end
18 |
--------------------------------------------------------------------------------
/ScrButton/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // ScrButton
4 | //
5 | // Created by 口贷网 on 15/7/8.
6 | // Copyright (c) 2015年 Afer. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface AppDelegate : UIResponder
13 |
14 | @property (strong, nonatomic) UIWindow *window;
15 |
16 | @property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext;
17 | @property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel;
18 | @property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator;
19 |
20 | - (void)saveContext;
21 | - (NSURL *)applicationDocumentsDirectory;
22 |
23 |
24 | @end
25 |
26 |
--------------------------------------------------------------------------------
/ScrButton.xcodeproj/xcuserdata/yihui.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | ScrButton.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 42BD7B031B4CC45600A7E958
16 |
17 | primary
18 |
19 |
20 | 42BD7B1F1B4CC45600A7E958
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/ScrButton.xcodeproj/xcuserdata/koudaiwang.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | ScrButton.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 42BD7B031B4CC45600A7E958
16 |
17 | primary
18 |
19 |
20 | 42BD7B1F1B4CC45600A7E958
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/ScrButton/ScrButton/SliderButtonView.h:
--------------------------------------------------------------------------------
1 | //
2 | // SliderButtonView.h
3 | // ScrButton
4 | //
5 | // Created by 口贷网 on 15/7/8.
6 | // Copyright (c) 2015年 Afer. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef void(^Button_Selected)(NSInteger tag);
12 |
13 | @interface SliderButtonView : UIView {
14 | UIView *_sliderView;
15 | NSInteger _currentButtonTag;
16 | CGFloat _buttonWidth;
17 | }
18 |
19 | @property (nonatomic, strong) NSMutableArray *buttonArray;
20 | @property (nonatomic, strong, setter=buttonCo:) UIColor *buttonColor;
21 | @property (nonatomic, assign, setter=currentIndexButton:) NSInteger index;
22 | @property (nonatomic, copy) Button_Selected button_selected_block;
23 |
24 | - (instancetype)initWithFrame:(CGRect)frame withButtonNames:(NSArray *)array;
25 | @end
26 |
--------------------------------------------------------------------------------
/ScrButtonTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/ScrButtonTests/ScrButtonTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // ScrButtonTests.m
3 | // ScrButtonTests
4 | //
5 | // Created by 口贷网 on 15/7/8.
6 | // Copyright (c) 2015年 Afer. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface ScrButtonTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation ScrButtonTests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/ScrButton/TableView.m:
--------------------------------------------------------------------------------
1 | //
2 | // TableView.m
3 | // ScrButton
4 | //
5 | // Created by 口贷网 on 15/7/22.
6 | // Copyright (c) 2015年 Afer. All rights reserved.
7 | //
8 |
9 | #import "TableView.h"
10 | #import "BiaoTableViewCell.h"
11 |
12 | @implementation TableView
13 |
14 | - (instancetype)initWithFrame:(CGRect)frame
15 | {
16 | self = [super initWithFrame:frame];
17 | if (self) {
18 | self.delegate = self;
19 | self.dataSource = self;
20 | [self registerNib:[UINib nibWithNibName:@"BiaoTableViewCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"BiaoTableViewCell"];
21 | }
22 | return self;
23 | }
24 |
25 | - (NSInteger)numberOfSections {
26 | return 1;
27 | }
28 |
29 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
30 | return 40;
31 | }
32 |
33 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
34 | BiaoTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"BiaoTableViewCell"];
35 | return cell;
36 | }
37 |
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/ScrButton/ScrButton/SliderScrollView.m:
--------------------------------------------------------------------------------
1 | //
2 | // SliderScrollView.m
3 | // ScrButton
4 | //
5 | // Created by 口贷网 on 15/7/8.
6 | // Copyright (c) 2015年 Afer. All rights reserved.
7 | //
8 |
9 | #import "SliderScrollView.h"
10 |
11 | @implementation SliderScrollView
12 |
13 | - (instancetype)initWithFrame:(CGRect)frame withViewArray:(NSArray *)viewArray
14 | {
15 | self = [super initWithFrame:frame];
16 | if (self) {
17 | CGFloat selfWidth = frame.size.width;
18 | CGFloat selfHeight = frame.size.height;
19 | NSInteger count = viewArray.count;
20 | _scr = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, selfWidth, selfHeight)];
21 | _scr.contentSize = CGSizeMake(selfWidth * count, selfHeight);
22 | _scr.pagingEnabled = YES;
23 | _scr.delegate = self;
24 | int i = 0;
25 | for (UIView *view in viewArray) {
26 | view.frame = CGRectMake(i * selfWidth, 0, selfWidth, selfHeight);
27 | [_scr addSubview:view];
28 | i ++;
29 | }
30 | [self addSubview:_scr];
31 |
32 | }
33 | return self;
34 | }
35 |
36 | - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView {
37 | NSInteger index = scrollView.contentOffset.x / self.frame.size.width;
38 | if (self.get_Index_Block) {
39 | self.get_Index_Block(index);
40 | }
41 | }
42 |
43 |
44 |
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/ScrButton/Images.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 | }
--------------------------------------------------------------------------------
/ScrButton.xcodeproj/project.xcworkspace/xcshareddata/ScrButton.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | 375A34E7-EC64-48DE-AFA0-E5F48C4B1E1B
9 | IDESourceControlProjectName
10 | ScrButton
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | 1A69A482BDBC829DD8C1F51D9B9F30641CF51613
14 | https://github.com/myafer/ScrButton.git
15 |
16 | IDESourceControlProjectPath
17 | ScrButton.xcodeproj
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | 1A69A482BDBC829DD8C1F51D9B9F30641CF51613
21 | ../..
22 |
23 | IDESourceControlProjectURL
24 | https://github.com/myafer/ScrButton.git
25 | IDESourceControlProjectVersion
26 | 111
27 | IDESourceControlProjectWCCIdentifier
28 | 1A69A482BDBC829DD8C1F51D9B9F30641CF51613
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | 1A69A482BDBC829DD8C1F51D9B9F30641CF51613
36 | IDESourceControlWCCName
37 | ScrButton
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/ScrButton/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/ScrButton/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // ScrButton
4 | //
5 | // Created by 口贷网 on 15/7/8.
6 | // Copyright (c) 2015年 Afer. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "SliderButtonView.h"
11 | #import "SliderScrollView.h"
12 | #import "TableView.h"
13 |
14 | #define kScreenWidth [UIScreen mainScreen].bounds.size.width
15 | #define kScreenHeight [UIScreen mainScreen].bounds.size.height
16 |
17 | @interface ViewController ()
18 |
19 | @end
20 |
21 | @implementation ViewController
22 |
23 | - (void)viewDidLoad {
24 | [super viewDidLoad];
25 |
26 | // 建三个view
27 | TableView *view1 = [[TableView alloc] initWithFrame:CGRectMake(0, 44, kScreenWidth, kScreenHeight - 88)];
28 | view1.backgroundColor = [UIColor redColor];
29 |
30 | UIView *view2 = [[UIView alloc] initWithFrame:CGRectMake(0, 44 , kScreenWidth, kScreenHeight - 44)];
31 | view2.backgroundColor = [UIColor blueColor];
32 |
33 | UIView *view3 = [[UIView alloc] initWithFrame:CGRectMake(0, 44, kScreenWidth, kScreenHeight - 44)];
34 | view3.backgroundColor = [UIColor purpleColor];
35 | NSArray *viewArray = @[view1, view2, view3];
36 |
37 | // 建三个按钮
38 | SliderButtonView *sli = [[SliderButtonView alloc] initWithFrame:CGRectMake(0, 0,kScreenWidth, 44) withButtonNames:@[@"正在招标", @"最新满标", @"成功还标"]];
39 | [self.view addSubview:sli];
40 |
41 | SliderScrollView *slis = [[SliderScrollView alloc] initWithFrame:CGRectMake(0, 44, kScreenWidth, kScreenHeight - 44) withViewArray:viewArray];
42 | [self.view addSubview:slis];
43 |
44 | slis.get_Index_Block = ^(NSInteger index){
45 | sli.index = index;
46 | };
47 | sli.button_selected_block = ^(NSInteger tag) {
48 | slis.scr.contentOffset = CGPointMake(tag * [UIScreen mainScreen].bounds.size.width, 0);
49 | };
50 |
51 | }
52 |
53 |
54 | @end
55 |
--------------------------------------------------------------------------------
/ScrButton/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 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/ScrButton/BiaoTableViewCell.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/ScrButton/ScrButton/SliderButtonView.m:
--------------------------------------------------------------------------------
1 | //
2 | // SliderButtonView.m
3 | // ScrButton
4 | //
5 | // Created by 口贷网 on 15/7/8.
6 | // Copyright (c) 2015年 Afer. All rights reserved.
7 | //
8 |
9 | #import "SliderButtonView.h"
10 | #define SELECTED_COLOR [UIColor colorWithRed:0.147 green:0.614 blue:1.000 alpha:1.000]
11 |
12 | @implementation SliderButtonView
13 |
14 | - (instancetype)initWithFrame:(CGRect)frame withButtonNames:(NSArray *)array{
15 | self = [super initWithFrame:frame];
16 | if (self) {
17 | _buttonArray = [NSMutableArray array];
18 | self.backgroundColor = [UIColor colorWithRed:1.000 green:0.990 blue:0.855 alpha:1.000];
19 |
20 | self.backgroundColor = [UIColor redColor];
21 | NSInteger count = array.count;
22 | CGFloat selfWidth = frame.size.width;
23 | CGFloat selfHeight = frame.size.height;
24 | CGFloat buttonWidth = selfWidth / (count * 1.0);
25 |
26 | for (int i = 0; i < array.count; i ++) {
27 | UIButton *bu = [UIButton buttonWithType:(UIButtonTypeCustom)];
28 | bu.frame = CGRectMake(i * buttonWidth, 0, buttonWidth, frame.size.height - 3);
29 | [bu setTitle:array[i] forState:(UIControlStateNormal)];
30 | [bu addTarget:self action:@selector(buttonPressed:) forControlEvents:(UIControlEventTouchUpInside)];
31 | [bu setTitleColor:[UIColor colorWithWhite:0.326 alpha:1.000] forState:(UIControlStateNormal)];
32 | [bu setTitleColor:SELECTED_COLOR forState:(UIControlStateSelected)];
33 | bu.tag = 1000 + i;
34 | [self addSubview:bu];
35 | bu.selected = i == 0 ? YES : NO;
36 | bu.titleLabel.font = [UIFont boldSystemFontOfSize:15];
37 | [_buttonArray addObject:bu];
38 | }
39 | UIView *grayLineView = [[UIView alloc] initWithFrame:CGRectMake(0, selfHeight - 1, selfWidth, 0.5)];
40 | grayLineView.backgroundColor = [UIColor colorWithRed: 201 / 255.0 green:201 / 255.0 blue:201 / 255.0 alpha:1.0];
41 | [self addSubview:grayLineView];
42 |
43 | _sliderView = [[UIView alloc] initWithFrame:CGRectMake(0, selfHeight - 3, buttonWidth, 2)];
44 | _sliderView.backgroundColor = SELECTED_COLOR;
45 | [self addSubview:_sliderView];
46 | _currentButtonTag = 0;
47 | self.backgroundColor = [UIColor whiteColor];
48 | }
49 | return self;
50 | }
51 |
52 | - (void)buttonPressed:(UIButton *)sender {
53 | if (sender.selected == YES) {
54 | return;
55 | }
56 | for (UIButton *bu in _buttonArray) {
57 | bu.selected = NO;
58 | }
59 | NSInteger tag = sender.tag - 1000;
60 | sender.selected = YES;
61 | [UIView animateWithDuration:labs(_currentButtonTag - tag) * 0.2 animations:^{
62 | _sliderView.frame = CGRectMake(tag * sender.frame.size.width, sender.frame.size.height, sender.frame.size.width, 2);
63 |
64 | }];
65 | if (self.button_selected_block) {
66 | self.button_selected_block(tag);
67 | }
68 |
69 | _currentButtonTag = tag;
70 | }
71 |
72 | - (void)buttonCo:(UIColor *)buttonColor {
73 | for (UIButton *bu in _buttonArray) {
74 | [bu setBackgroundColor:buttonColor];
75 | }
76 | }
77 |
78 | - (void)currentIndexButton:(NSInteger)index {
79 | for (NSInteger i = 0; i < _buttonArray.count; i ++) {
80 | UIButton *bu = _buttonArray[i];
81 | bu.selected = NO;
82 | if (i == index) {
83 | [self buttonPressed:bu];
84 | }
85 | }
86 | }
87 |
88 |
89 | @end
90 |
--------------------------------------------------------------------------------
/ScrButton/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
20 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/ScrButton.xcodeproj/xcuserdata/yihui.xcuserdatad/xcschemes/ScrButton.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
49 |
50 |
51 |
52 |
53 |
54 |
64 |
66 |
72 |
73 |
74 |
75 |
76 |
77 |
83 |
85 |
91 |
92 |
93 |
94 |
96 |
97 |
100 |
101 |
102 |
--------------------------------------------------------------------------------
/ScrButton.xcodeproj/xcuserdata/koudaiwang.xcuserdatad/xcschemes/ScrButton.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
38 |
39 |
44 |
45 |
47 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
65 |
66 |
75 |
77 |
83 |
84 |
85 |
86 |
87 |
88 |
94 |
96 |
102 |
103 |
104 |
105 |
107 |
108 |
111 |
112 |
113 |
--------------------------------------------------------------------------------
/ScrButton/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // ScrButton
4 | //
5 | // Created by 口贷网 on 15/7/8.
6 | // Copyright (c) 2015年 Afer. 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 | - (void)applicationWillResignActive:(UIApplication *)application {
24 | // 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.
25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
26 | }
27 |
28 | - (void)applicationDidEnterBackground:(UIApplication *)application {
29 | // 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.
30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
31 | }
32 |
33 | - (void)applicationWillEnterForeground:(UIApplication *)application {
34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
35 | }
36 |
37 | - (void)applicationDidBecomeActive:(UIApplication *)application {
38 | // 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.
39 | }
40 |
41 | - (void)applicationWillTerminate:(UIApplication *)application {
42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
43 | // Saves changes in the application's managed object context before the application terminates.
44 | [self saveContext];
45 | }
46 |
47 | #pragma mark - Core Data stack
48 |
49 | @synthesize managedObjectContext = _managedObjectContext;
50 | @synthesize managedObjectModel = _managedObjectModel;
51 | @synthesize persistentStoreCoordinator = _persistentStoreCoordinator;
52 |
53 | - (NSURL *)applicationDocumentsDirectory {
54 | // The directory the application uses to store the Core Data store file. This code uses a directory named "com.ScrButton" in the application's documents directory.
55 | return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];
56 | }
57 |
58 | - (NSManagedObjectModel *)managedObjectModel {
59 | // The managed object model for the application. It is a fatal error for the application not to be able to find and load its model.
60 | if (_managedObjectModel != nil) {
61 | return _managedObjectModel;
62 | }
63 | NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"ScrButton" withExtension:@"momd"];
64 | _managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL];
65 | return _managedObjectModel;
66 | }
67 |
68 | - (NSPersistentStoreCoordinator *)persistentStoreCoordinator {
69 | // The persistent store coordinator for the application. This implementation creates and return a coordinator, having added the store for the application to it.
70 | if (_persistentStoreCoordinator != nil) {
71 | return _persistentStoreCoordinator;
72 | }
73 |
74 | // Create the coordinator and store
75 |
76 | _persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]];
77 | NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"ScrButton.sqlite"];
78 | NSError *error = nil;
79 | NSString *failureReason = @"There was an error creating or loading the application's saved data.";
80 | if (![_persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:nil error:&error]) {
81 | // Report any error we got.
82 | NSMutableDictionary *dict = [NSMutableDictionary dictionary];
83 | dict[NSLocalizedDescriptionKey] = @"Failed to initialize the application's saved data";
84 | dict[NSLocalizedFailureReasonErrorKey] = failureReason;
85 | dict[NSUnderlyingErrorKey] = error;
86 | error = [NSError errorWithDomain:@"YOUR_ERROR_DOMAIN" code:9999 userInfo:dict];
87 | // Replace this with code to handle the error appropriately.
88 | // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
89 | NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
90 | abort();
91 | }
92 |
93 | return _persistentStoreCoordinator;
94 | }
95 |
96 |
97 | - (NSManagedObjectContext *)managedObjectContext {
98 | // Returns the managed object context for the application (which is already bound to the persistent store coordinator for the application.)
99 | if (_managedObjectContext != nil) {
100 | return _managedObjectContext;
101 | }
102 |
103 | NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator];
104 | if (!coordinator) {
105 | return nil;
106 | }
107 | _managedObjectContext = [[NSManagedObjectContext alloc] init];
108 | [_managedObjectContext setPersistentStoreCoordinator:coordinator];
109 | return _managedObjectContext;
110 | }
111 |
112 | #pragma mark - Core Data Saving support
113 |
114 | - (void)saveContext {
115 | NSManagedObjectContext *managedObjectContext = self.managedObjectContext;
116 | if (managedObjectContext != nil) {
117 | NSError *error = nil;
118 | if ([managedObjectContext hasChanges] && ![managedObjectContext save:&error]) {
119 | // Replace this implementation with code to handle the error appropriately.
120 | // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
121 | NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
122 | abort();
123 | }
124 | }
125 | }
126 |
127 | @end
128 |
--------------------------------------------------------------------------------
/ScrButton.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 42A07FC41B5F8938000BC0D4 /* BiaoTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 42A07FC21B5F8938000BC0D4 /* BiaoTableViewCell.m */; };
11 | 42A07FC51B5F8938000BC0D4 /* BiaoTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 42A07FC31B5F8938000BC0D4 /* BiaoTableViewCell.xib */; };
12 | 42A07FC81B5F897E000BC0D4 /* TableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 42A07FC71B5F897E000BC0D4 /* TableView.m */; };
13 | 42BD7B0A1B4CC45600A7E958 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 42BD7B091B4CC45600A7E958 /* main.m */; };
14 | 42BD7B0D1B4CC45600A7E958 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 42BD7B0C1B4CC45600A7E958 /* AppDelegate.m */; };
15 | 42BD7B101B4CC45600A7E958 /* ScrButton.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 42BD7B0E1B4CC45600A7E958 /* ScrButton.xcdatamodeld */; };
16 | 42BD7B131B4CC45600A7E958 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 42BD7B121B4CC45600A7E958 /* ViewController.m */; };
17 | 42BD7B161B4CC45600A7E958 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 42BD7B141B4CC45600A7E958 /* Main.storyboard */; };
18 | 42BD7B181B4CC45600A7E958 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 42BD7B171B4CC45600A7E958 /* Images.xcassets */; };
19 | 42BD7B1B1B4CC45600A7E958 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 42BD7B191B4CC45600A7E958 /* LaunchScreen.xib */; };
20 | 42BD7B271B4CC45600A7E958 /* ScrButtonTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 42BD7B261B4CC45600A7E958 /* ScrButtonTests.m */; };
21 | 8F34D4611BEF278A0082EF62 /* SliderButtonView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F34D45E1BEF278A0082EF62 /* SliderButtonView.m */; };
22 | 8F34D4621BEF278A0082EF62 /* SliderScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F34D4601BEF278A0082EF62 /* SliderScrollView.m */; };
23 | /* End PBXBuildFile section */
24 |
25 | /* Begin PBXContainerItemProxy section */
26 | 42BD7B211B4CC45600A7E958 /* PBXContainerItemProxy */ = {
27 | isa = PBXContainerItemProxy;
28 | containerPortal = 42BD7AFC1B4CC45600A7E958 /* Project object */;
29 | proxyType = 1;
30 | remoteGlobalIDString = 42BD7B031B4CC45600A7E958;
31 | remoteInfo = ScrButton;
32 | };
33 | /* End PBXContainerItemProxy section */
34 |
35 | /* Begin PBXFileReference section */
36 | 42A07FC11B5F8938000BC0D4 /* BiaoTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BiaoTableViewCell.h; sourceTree = ""; };
37 | 42A07FC21B5F8938000BC0D4 /* BiaoTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BiaoTableViewCell.m; sourceTree = ""; };
38 | 42A07FC31B5F8938000BC0D4 /* BiaoTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = BiaoTableViewCell.xib; sourceTree = ""; };
39 | 42A07FC61B5F897E000BC0D4 /* TableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TableView.h; sourceTree = ""; };
40 | 42A07FC71B5F897E000BC0D4 /* TableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TableView.m; sourceTree = ""; };
41 | 42BD7B041B4CC45600A7E958 /* ScrButton.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ScrButton.app; sourceTree = BUILT_PRODUCTS_DIR; };
42 | 42BD7B081B4CC45600A7E958 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
43 | 42BD7B091B4CC45600A7E958 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
44 | 42BD7B0B1B4CC45600A7E958 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
45 | 42BD7B0C1B4CC45600A7E958 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
46 | 42BD7B0F1B4CC45600A7E958 /* ScrButton.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = ScrButton.xcdatamodel; sourceTree = ""; };
47 | 42BD7B111B4CC45600A7E958 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
48 | 42BD7B121B4CC45600A7E958 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
49 | 42BD7B151B4CC45600A7E958 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
50 | 42BD7B171B4CC45600A7E958 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
51 | 42BD7B1A1B4CC45600A7E958 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
52 | 42BD7B201B4CC45600A7E958 /* ScrButtonTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ScrButtonTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
53 | 42BD7B251B4CC45600A7E958 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
54 | 42BD7B261B4CC45600A7E958 /* ScrButtonTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ScrButtonTests.m; sourceTree = ""; };
55 | 8F34D45D1BEF278A0082EF62 /* SliderButtonView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SliderButtonView.h; sourceTree = ""; };
56 | 8F34D45E1BEF278A0082EF62 /* SliderButtonView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SliderButtonView.m; sourceTree = ""; };
57 | 8F34D45F1BEF278A0082EF62 /* SliderScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SliderScrollView.h; sourceTree = ""; };
58 | 8F34D4601BEF278A0082EF62 /* SliderScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SliderScrollView.m; sourceTree = ""; };
59 | /* End PBXFileReference section */
60 |
61 | /* Begin PBXFrameworksBuildPhase section */
62 | 42BD7B011B4CC45600A7E958 /* Frameworks */ = {
63 | isa = PBXFrameworksBuildPhase;
64 | buildActionMask = 2147483647;
65 | files = (
66 | );
67 | runOnlyForDeploymentPostprocessing = 0;
68 | };
69 | 42BD7B1D1B4CC45600A7E958 /* Frameworks */ = {
70 | isa = PBXFrameworksBuildPhase;
71 | buildActionMask = 2147483647;
72 | files = (
73 | );
74 | runOnlyForDeploymentPostprocessing = 0;
75 | };
76 | /* End PBXFrameworksBuildPhase section */
77 |
78 | /* Begin PBXGroup section */
79 | 42BD7AFB1B4CC45600A7E958 = {
80 | isa = PBXGroup;
81 | children = (
82 | 42BD7B061B4CC45600A7E958 /* ScrButton */,
83 | 42BD7B231B4CC45600A7E958 /* ScrButtonTests */,
84 | 42BD7B051B4CC45600A7E958 /* Products */,
85 | );
86 | sourceTree = "";
87 | };
88 | 42BD7B051B4CC45600A7E958 /* Products */ = {
89 | isa = PBXGroup;
90 | children = (
91 | 42BD7B041B4CC45600A7E958 /* ScrButton.app */,
92 | 42BD7B201B4CC45600A7E958 /* ScrButtonTests.xctest */,
93 | );
94 | name = Products;
95 | sourceTree = "";
96 | };
97 | 42BD7B061B4CC45600A7E958 /* ScrButton */ = {
98 | isa = PBXGroup;
99 | children = (
100 | 8F34D45C1BEF278A0082EF62 /* ScrButton */,
101 | 42BD7B0B1B4CC45600A7E958 /* AppDelegate.h */,
102 | 42BD7B0C1B4CC45600A7E958 /* AppDelegate.m */,
103 | 42BD7B111B4CC45600A7E958 /* ViewController.h */,
104 | 42BD7B121B4CC45600A7E958 /* ViewController.m */,
105 | 42BD7B141B4CC45600A7E958 /* Main.storyboard */,
106 | 42BD7B171B4CC45600A7E958 /* Images.xcassets */,
107 | 42BD7B191B4CC45600A7E958 /* LaunchScreen.xib */,
108 | 42BD7B0E1B4CC45600A7E958 /* ScrButton.xcdatamodeld */,
109 | 42BD7B071B4CC45600A7E958 /* Supporting Files */,
110 | 42A07FC11B5F8938000BC0D4 /* BiaoTableViewCell.h */,
111 | 42A07FC21B5F8938000BC0D4 /* BiaoTableViewCell.m */,
112 | 42A07FC31B5F8938000BC0D4 /* BiaoTableViewCell.xib */,
113 | 42A07FC61B5F897E000BC0D4 /* TableView.h */,
114 | 42A07FC71B5F897E000BC0D4 /* TableView.m */,
115 | );
116 | path = ScrButton;
117 | sourceTree = "";
118 | };
119 | 42BD7B071B4CC45600A7E958 /* Supporting Files */ = {
120 | isa = PBXGroup;
121 | children = (
122 | 42BD7B081B4CC45600A7E958 /* Info.plist */,
123 | 42BD7B091B4CC45600A7E958 /* main.m */,
124 | );
125 | name = "Supporting Files";
126 | sourceTree = "";
127 | };
128 | 42BD7B231B4CC45600A7E958 /* ScrButtonTests */ = {
129 | isa = PBXGroup;
130 | children = (
131 | 42BD7B261B4CC45600A7E958 /* ScrButtonTests.m */,
132 | 42BD7B241B4CC45600A7E958 /* Supporting Files */,
133 | );
134 | path = ScrButtonTests;
135 | sourceTree = "";
136 | };
137 | 42BD7B241B4CC45600A7E958 /* Supporting Files */ = {
138 | isa = PBXGroup;
139 | children = (
140 | 42BD7B251B4CC45600A7E958 /* Info.plist */,
141 | );
142 | name = "Supporting Files";
143 | sourceTree = "";
144 | };
145 | 8F34D45C1BEF278A0082EF62 /* ScrButton */ = {
146 | isa = PBXGroup;
147 | children = (
148 | 8F34D45D1BEF278A0082EF62 /* SliderButtonView.h */,
149 | 8F34D45E1BEF278A0082EF62 /* SliderButtonView.m */,
150 | 8F34D45F1BEF278A0082EF62 /* SliderScrollView.h */,
151 | 8F34D4601BEF278A0082EF62 /* SliderScrollView.m */,
152 | );
153 | path = ScrButton;
154 | sourceTree = "";
155 | };
156 | /* End PBXGroup section */
157 |
158 | /* Begin PBXNativeTarget section */
159 | 42BD7B031B4CC45600A7E958 /* ScrButton */ = {
160 | isa = PBXNativeTarget;
161 | buildConfigurationList = 42BD7B2A1B4CC45600A7E958 /* Build configuration list for PBXNativeTarget "ScrButton" */;
162 | buildPhases = (
163 | 42BD7B001B4CC45600A7E958 /* Sources */,
164 | 42BD7B011B4CC45600A7E958 /* Frameworks */,
165 | 42BD7B021B4CC45600A7E958 /* Resources */,
166 | );
167 | buildRules = (
168 | );
169 | dependencies = (
170 | );
171 | name = ScrButton;
172 | productName = ScrButton;
173 | productReference = 42BD7B041B4CC45600A7E958 /* ScrButton.app */;
174 | productType = "com.apple.product-type.application";
175 | };
176 | 42BD7B1F1B4CC45600A7E958 /* ScrButtonTests */ = {
177 | isa = PBXNativeTarget;
178 | buildConfigurationList = 42BD7B2D1B4CC45600A7E958 /* Build configuration list for PBXNativeTarget "ScrButtonTests" */;
179 | buildPhases = (
180 | 42BD7B1C1B4CC45600A7E958 /* Sources */,
181 | 42BD7B1D1B4CC45600A7E958 /* Frameworks */,
182 | 42BD7B1E1B4CC45600A7E958 /* Resources */,
183 | );
184 | buildRules = (
185 | );
186 | dependencies = (
187 | 42BD7B221B4CC45600A7E958 /* PBXTargetDependency */,
188 | );
189 | name = ScrButtonTests;
190 | productName = ScrButtonTests;
191 | productReference = 42BD7B201B4CC45600A7E958 /* ScrButtonTests.xctest */;
192 | productType = "com.apple.product-type.bundle.unit-test";
193 | };
194 | /* End PBXNativeTarget section */
195 |
196 | /* Begin PBXProject section */
197 | 42BD7AFC1B4CC45600A7E958 /* Project object */ = {
198 | isa = PBXProject;
199 | attributes = {
200 | LastUpgradeCheck = 0630;
201 | ORGANIZATIONNAME = Afer;
202 | TargetAttributes = {
203 | 42BD7B031B4CC45600A7E958 = {
204 | CreatedOnToolsVersion = 6.3.1;
205 | };
206 | 42BD7B1F1B4CC45600A7E958 = {
207 | CreatedOnToolsVersion = 6.3.1;
208 | TestTargetID = 42BD7B031B4CC45600A7E958;
209 | };
210 | };
211 | };
212 | buildConfigurationList = 42BD7AFF1B4CC45600A7E958 /* Build configuration list for PBXProject "ScrButton" */;
213 | compatibilityVersion = "Xcode 3.2";
214 | developmentRegion = English;
215 | hasScannedForEncodings = 0;
216 | knownRegions = (
217 | en,
218 | Base,
219 | );
220 | mainGroup = 42BD7AFB1B4CC45600A7E958;
221 | productRefGroup = 42BD7B051B4CC45600A7E958 /* Products */;
222 | projectDirPath = "";
223 | projectRoot = "";
224 | targets = (
225 | 42BD7B031B4CC45600A7E958 /* ScrButton */,
226 | 42BD7B1F1B4CC45600A7E958 /* ScrButtonTests */,
227 | );
228 | };
229 | /* End PBXProject section */
230 |
231 | /* Begin PBXResourcesBuildPhase section */
232 | 42BD7B021B4CC45600A7E958 /* Resources */ = {
233 | isa = PBXResourcesBuildPhase;
234 | buildActionMask = 2147483647;
235 | files = (
236 | 42A07FC51B5F8938000BC0D4 /* BiaoTableViewCell.xib in Resources */,
237 | 42BD7B161B4CC45600A7E958 /* Main.storyboard in Resources */,
238 | 42BD7B1B1B4CC45600A7E958 /* LaunchScreen.xib in Resources */,
239 | 42BD7B181B4CC45600A7E958 /* Images.xcassets in Resources */,
240 | );
241 | runOnlyForDeploymentPostprocessing = 0;
242 | };
243 | 42BD7B1E1B4CC45600A7E958 /* Resources */ = {
244 | isa = PBXResourcesBuildPhase;
245 | buildActionMask = 2147483647;
246 | files = (
247 | );
248 | runOnlyForDeploymentPostprocessing = 0;
249 | };
250 | /* End PBXResourcesBuildPhase section */
251 |
252 | /* Begin PBXSourcesBuildPhase section */
253 | 42BD7B001B4CC45600A7E958 /* Sources */ = {
254 | isa = PBXSourcesBuildPhase;
255 | buildActionMask = 2147483647;
256 | files = (
257 | 42A07FC41B5F8938000BC0D4 /* BiaoTableViewCell.m in Sources */,
258 | 8F34D4611BEF278A0082EF62 /* SliderButtonView.m in Sources */,
259 | 8F34D4621BEF278A0082EF62 /* SliderScrollView.m in Sources */,
260 | 42A07FC81B5F897E000BC0D4 /* TableView.m in Sources */,
261 | 42BD7B101B4CC45600A7E958 /* ScrButton.xcdatamodeld in Sources */,
262 | 42BD7B0D1B4CC45600A7E958 /* AppDelegate.m in Sources */,
263 | 42BD7B131B4CC45600A7E958 /* ViewController.m in Sources */,
264 | 42BD7B0A1B4CC45600A7E958 /* main.m in Sources */,
265 | );
266 | runOnlyForDeploymentPostprocessing = 0;
267 | };
268 | 42BD7B1C1B4CC45600A7E958 /* Sources */ = {
269 | isa = PBXSourcesBuildPhase;
270 | buildActionMask = 2147483647;
271 | files = (
272 | 42BD7B271B4CC45600A7E958 /* ScrButtonTests.m in Sources */,
273 | );
274 | runOnlyForDeploymentPostprocessing = 0;
275 | };
276 | /* End PBXSourcesBuildPhase section */
277 |
278 | /* Begin PBXTargetDependency section */
279 | 42BD7B221B4CC45600A7E958 /* PBXTargetDependency */ = {
280 | isa = PBXTargetDependency;
281 | target = 42BD7B031B4CC45600A7E958 /* ScrButton */;
282 | targetProxy = 42BD7B211B4CC45600A7E958 /* PBXContainerItemProxy */;
283 | };
284 | /* End PBXTargetDependency section */
285 |
286 | /* Begin PBXVariantGroup section */
287 | 42BD7B141B4CC45600A7E958 /* Main.storyboard */ = {
288 | isa = PBXVariantGroup;
289 | children = (
290 | 42BD7B151B4CC45600A7E958 /* Base */,
291 | );
292 | name = Main.storyboard;
293 | sourceTree = "";
294 | };
295 | 42BD7B191B4CC45600A7E958 /* LaunchScreen.xib */ = {
296 | isa = PBXVariantGroup;
297 | children = (
298 | 42BD7B1A1B4CC45600A7E958 /* Base */,
299 | );
300 | name = LaunchScreen.xib;
301 | sourceTree = "";
302 | };
303 | /* End PBXVariantGroup section */
304 |
305 | /* Begin XCBuildConfiguration section */
306 | 42BD7B281B4CC45600A7E958 /* Debug */ = {
307 | isa = XCBuildConfiguration;
308 | buildSettings = {
309 | ALWAYS_SEARCH_USER_PATHS = NO;
310 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
311 | CLANG_CXX_LIBRARY = "libc++";
312 | CLANG_ENABLE_MODULES = YES;
313 | CLANG_ENABLE_OBJC_ARC = YES;
314 | CLANG_WARN_BOOL_CONVERSION = YES;
315 | CLANG_WARN_CONSTANT_CONVERSION = YES;
316 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
317 | CLANG_WARN_EMPTY_BODY = YES;
318 | CLANG_WARN_ENUM_CONVERSION = YES;
319 | CLANG_WARN_INT_CONVERSION = YES;
320 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
321 | CLANG_WARN_UNREACHABLE_CODE = YES;
322 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
323 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
324 | COPY_PHASE_STRIP = NO;
325 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
326 | ENABLE_STRICT_OBJC_MSGSEND = YES;
327 | GCC_C_LANGUAGE_STANDARD = gnu99;
328 | GCC_DYNAMIC_NO_PIC = NO;
329 | GCC_NO_COMMON_BLOCKS = YES;
330 | GCC_OPTIMIZATION_LEVEL = 0;
331 | GCC_PREPROCESSOR_DEFINITIONS = (
332 | "DEBUG=1",
333 | "$(inherited)",
334 | );
335 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
336 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
337 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
338 | GCC_WARN_UNDECLARED_SELECTOR = YES;
339 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
340 | GCC_WARN_UNUSED_FUNCTION = YES;
341 | GCC_WARN_UNUSED_VARIABLE = YES;
342 | IPHONEOS_DEPLOYMENT_TARGET = 8.3;
343 | MTL_ENABLE_DEBUG_INFO = YES;
344 | ONLY_ACTIVE_ARCH = YES;
345 | SDKROOT = iphoneos;
346 | TARGETED_DEVICE_FAMILY = "1,2";
347 | };
348 | name = Debug;
349 | };
350 | 42BD7B291B4CC45600A7E958 /* Release */ = {
351 | isa = XCBuildConfiguration;
352 | buildSettings = {
353 | ALWAYS_SEARCH_USER_PATHS = NO;
354 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
355 | CLANG_CXX_LIBRARY = "libc++";
356 | CLANG_ENABLE_MODULES = YES;
357 | CLANG_ENABLE_OBJC_ARC = YES;
358 | CLANG_WARN_BOOL_CONVERSION = YES;
359 | CLANG_WARN_CONSTANT_CONVERSION = YES;
360 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
361 | CLANG_WARN_EMPTY_BODY = YES;
362 | CLANG_WARN_ENUM_CONVERSION = YES;
363 | CLANG_WARN_INT_CONVERSION = YES;
364 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
365 | CLANG_WARN_UNREACHABLE_CODE = YES;
366 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
367 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
368 | COPY_PHASE_STRIP = NO;
369 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
370 | ENABLE_NS_ASSERTIONS = NO;
371 | ENABLE_STRICT_OBJC_MSGSEND = YES;
372 | GCC_C_LANGUAGE_STANDARD = gnu99;
373 | GCC_NO_COMMON_BLOCKS = YES;
374 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
375 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
376 | GCC_WARN_UNDECLARED_SELECTOR = YES;
377 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
378 | GCC_WARN_UNUSED_FUNCTION = YES;
379 | GCC_WARN_UNUSED_VARIABLE = YES;
380 | IPHONEOS_DEPLOYMENT_TARGET = 8.3;
381 | MTL_ENABLE_DEBUG_INFO = NO;
382 | SDKROOT = iphoneos;
383 | TARGETED_DEVICE_FAMILY = "1,2";
384 | VALIDATE_PRODUCT = YES;
385 | };
386 | name = Release;
387 | };
388 | 42BD7B2B1B4CC45600A7E958 /* Debug */ = {
389 | isa = XCBuildConfiguration;
390 | buildSettings = {
391 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
392 | INFOPLIST_FILE = ScrButton/Info.plist;
393 | IPHONEOS_DEPLOYMENT_TARGET = 7.0;
394 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
395 | PRODUCT_NAME = "$(TARGET_NAME)";
396 | };
397 | name = Debug;
398 | };
399 | 42BD7B2C1B4CC45600A7E958 /* Release */ = {
400 | isa = XCBuildConfiguration;
401 | buildSettings = {
402 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
403 | INFOPLIST_FILE = ScrButton/Info.plist;
404 | IPHONEOS_DEPLOYMENT_TARGET = 7.0;
405 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
406 | PRODUCT_NAME = "$(TARGET_NAME)";
407 | };
408 | name = Release;
409 | };
410 | 42BD7B2E1B4CC45600A7E958 /* Debug */ = {
411 | isa = XCBuildConfiguration;
412 | buildSettings = {
413 | BUNDLE_LOADER = "$(TEST_HOST)";
414 | FRAMEWORK_SEARCH_PATHS = (
415 | "$(SDKROOT)/Developer/Library/Frameworks",
416 | "$(inherited)",
417 | );
418 | GCC_PREPROCESSOR_DEFINITIONS = (
419 | "DEBUG=1",
420 | "$(inherited)",
421 | );
422 | INFOPLIST_FILE = ScrButtonTests/Info.plist;
423 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
424 | PRODUCT_NAME = "$(TARGET_NAME)";
425 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ScrButton.app/ScrButton";
426 | };
427 | name = Debug;
428 | };
429 | 42BD7B2F1B4CC45600A7E958 /* Release */ = {
430 | isa = XCBuildConfiguration;
431 | buildSettings = {
432 | BUNDLE_LOADER = "$(TEST_HOST)";
433 | FRAMEWORK_SEARCH_PATHS = (
434 | "$(SDKROOT)/Developer/Library/Frameworks",
435 | "$(inherited)",
436 | );
437 | INFOPLIST_FILE = ScrButtonTests/Info.plist;
438 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
439 | PRODUCT_NAME = "$(TARGET_NAME)";
440 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ScrButton.app/ScrButton";
441 | };
442 | name = Release;
443 | };
444 | /* End XCBuildConfiguration section */
445 |
446 | /* Begin XCConfigurationList section */
447 | 42BD7AFF1B4CC45600A7E958 /* Build configuration list for PBXProject "ScrButton" */ = {
448 | isa = XCConfigurationList;
449 | buildConfigurations = (
450 | 42BD7B281B4CC45600A7E958 /* Debug */,
451 | 42BD7B291B4CC45600A7E958 /* Release */,
452 | );
453 | defaultConfigurationIsVisible = 0;
454 | defaultConfigurationName = Release;
455 | };
456 | 42BD7B2A1B4CC45600A7E958 /* Build configuration list for PBXNativeTarget "ScrButton" */ = {
457 | isa = XCConfigurationList;
458 | buildConfigurations = (
459 | 42BD7B2B1B4CC45600A7E958 /* Debug */,
460 | 42BD7B2C1B4CC45600A7E958 /* Release */,
461 | );
462 | defaultConfigurationIsVisible = 0;
463 | defaultConfigurationName = Release;
464 | };
465 | 42BD7B2D1B4CC45600A7E958 /* Build configuration list for PBXNativeTarget "ScrButtonTests" */ = {
466 | isa = XCConfigurationList;
467 | buildConfigurations = (
468 | 42BD7B2E1B4CC45600A7E958 /* Debug */,
469 | 42BD7B2F1B4CC45600A7E958 /* Release */,
470 | );
471 | defaultConfigurationIsVisible = 0;
472 | defaultConfigurationName = Release;
473 | };
474 | /* End XCConfigurationList section */
475 |
476 | /* Begin XCVersionGroup section */
477 | 42BD7B0E1B4CC45600A7E958 /* ScrButton.xcdatamodeld */ = {
478 | isa = XCVersionGroup;
479 | children = (
480 | 42BD7B0F1B4CC45600A7E958 /* ScrButton.xcdatamodel */,
481 | );
482 | currentVersion = 42BD7B0F1B4CC45600A7E958 /* ScrButton.xcdatamodel */;
483 | path = ScrButton.xcdatamodeld;
484 | sourceTree = "";
485 | versionGroupType = wrapper.xcdatamodel;
486 | };
487 | /* End XCVersionGroup section */
488 | };
489 | rootObject = 42BD7AFC1B4CC45600A7E958 /* Project object */;
490 | }
491 |
--------------------------------------------------------------------------------