├── PSSTableViewNoneData
├── PSSTableViewNoneData.xcodeproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── project.pbxproj
├── PSSTableViewNoneData
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── AppDelegate.m
│ └── ViewController.m
├── PSSTableViewNoneDataSet
│ ├── PSSNoneDataView
│ │ ├── PSSNoneDataView.h
│ │ └── PSSNoneDataView.m
│ ├── UITableView+PSSNoneData.h
│ └── UITableView+PSSNoneData.m
└── PSSTableViewNoneData.podspec
├── .gitignore
└── README.md
/PSSTableViewNoneData/PSSTableViewNoneData.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/PSSTableViewNoneData/PSSTableViewNoneData/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // PSSTableViewNoneData
4 | //
5 | // Created by 山和霞 on 17/4/26.
6 | // Copyright © 2017年 庞仕山. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/PSSTableViewNoneData/PSSTableViewNoneDataSet/PSSNoneDataView/PSSNoneDataView.h:
--------------------------------------------------------------------------------
1 | //
2 | // PSSNoneDataView.h
3 | // PSSTableViewNoneData
4 | //
5 | // Created by 山和霞 on 17/4/26.
6 | // Copyright © 2017年 庞仕山. All rights reserved.
7 | // 如果tableView的数据为空时, 显示这个View, 可以修改这个view现实的内容
8 |
9 | #import
10 |
11 | @interface PSSNoneDataView : UIView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/PSSTableViewNoneData/PSSTableViewNoneData/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // PSSTableViewNoneData
4 | //
5 | // Created by 山和霞 on 17/4/26.
6 | // Copyright © 2017年 庞仕山. 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 |
--------------------------------------------------------------------------------
/PSSTableViewNoneData/PSSTableViewNoneData/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // PSSTableViewNoneData
4 | //
5 | // Created by 山和霞 on 17/4/26.
6 | // Copyright © 2017年 庞仕山. 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 |
--------------------------------------------------------------------------------
/PSSTableViewNoneData/PSSTableViewNoneData.podspec:
--------------------------------------------------------------------------------
1 | @version = "1.0.2"
2 |
3 | Pod::Spec.new do |s|
4 | s.name = "PSSTableViewNoneData"
5 | s.version = @version
6 | s.summary = "A drop-in UITableView superclass category for showing empty datasets whenever the view has no content to display."
7 | s.description = "It will work automatically, by just conforming to PSSTableViewNoneData, and returning the data you want to show. The -reloadData call will be observed so the empty dataset will be configured whenever needed."
8 | s.homepage = "https://github.com/Pangshishan/PSSTableViewNoneData"
9 | s.license = { :type => 'MIT', :file => 'LICENSE' }
10 | s.author = { "Pangshishan" => "Pangshishan1@163.com" }
11 | s.ios.deployment_target = '8.0'
12 | s.source = { :git => "https://github.com/Pangshishan/PSSTableViewNoneData.git", :tag => "v#{s.version}" }
13 | s.source_files = 'PSSTableViewNoneData/PSSTableViewNoneDataSet/**/*.{h,m}'
14 | s.requires_arc = true
15 | s.framework = "UIKit"
16 | end
--------------------------------------------------------------------------------
/PSSTableViewNoneData/PSSTableViewNoneDataSet/PSSNoneDataView/PSSNoneDataView.m:
--------------------------------------------------------------------------------
1 | //
2 | // PSSNoneDataView.m
3 | // PSSTableViewNoneData
4 | //
5 | // Created by 山和霞 on 17/4/26.
6 | // Copyright © 2017年 庞仕山. All rights reserved.
7 | //
8 |
9 | #import "PSSNoneDataView.h"
10 |
11 | @interface PSSNoneDataView ()
12 |
13 | @property (nonatomic, strong) UILabel *messageLabel;
14 |
15 | @end
16 |
17 | @implementation PSSNoneDataView
18 |
19 | - (instancetype)init
20 | {
21 | self = [super init];
22 | if (self) {
23 | // 此处添加姿势图
24 | }
25 | return self;
26 | }
27 |
28 | // 布局
29 | - (void)layoutSubviews
30 | {
31 | [super layoutSubviews];
32 | [self.messageLabel sizeToFit];
33 | self.messageLabel.center = CGPointMake(self.bounds.size.width / 2, self.bounds.size.height / 2);
34 | }
35 |
36 | - (UILabel *)messageLabel
37 | {
38 | if (_messageLabel == nil) {
39 | _messageLabel = [UILabel new];
40 | _messageLabel.text = @"暂无数据";
41 | _messageLabel.textColor = [UIColor lightGrayColor];
42 | _messageLabel.font = [UIFont systemFontOfSize:18];
43 | [self addSubview:_messageLabel];
44 | }
45 | return _messageLabel;
46 | }
47 |
48 | @end
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/PSSTableViewNoneData/PSSTableViewNoneDataSet/UITableView+PSSNoneData.h:
--------------------------------------------------------------------------------
1 | //
2 | // UITableView+PSSNoneData.h
3 | // PSSTableViewNoneData
4 | //
5 | // Created by 山和霞 on 17/4/26.
6 | // Copyright © 2017年 庞仕山. All rights reserved.
7 | //
8 |
9 | #import
10 | @class PSSNoneDataView;
11 | typedef enum : NSUInteger {
12 | PSSNoneDataStyleNone, // 关闭此机制
13 | PSSNoneDataStyleDefault, // 使用PSS默认的视图 (默认视图)
14 | PSSNoneDataStyleDIY, // 自定义DIY视图, 如果DIY视图为nil 使用PSS默认视图
15 | } PSSNoneDataStyle;
16 |
17 | // 这是默认的style, 默认是使用 PSS默认视图 的
18 | extern PSSNoneDataStyle PSS_DefaultStyle;
19 |
20 | @interface UITableView (PSSNoneData)
21 |
22 | @property (nonatomic, assign) PSSNoneDataStyle pss_noneDataStyle;
23 |
24 | /*
25 | * 只在 PSSNoneDataStyleDIY 下生效
26 | * frame 或者 布局, 需要自己给定
27 | */
28 | @property (nonatomic, strong) UIView *pss_diyView;
29 |
30 | /*
31 | * 描述: 是否显示 无数据视图
32 | * 只在 非PSSNoneDataStyleNone并且pss_isManualShow==YES 时生效
33 | */
34 | @property (nonatomic, assign) BOOL pss_showNoneDataView;
35 | /*
36 | * 描述: 是否手动显示 无数据视图; 默认为NO
37 | */
38 | @property (nonatomic, assign) BOOL pss_isManualShow;
39 |
40 | // 默认视图, readonly
41 | @property (nonatomic, strong, readonly) PSSNoneDataView *pss_defaultView;
42 |
43 | @end
44 |
45 | @interface UIScrollView (PSS)
46 |
47 | - (void)pss_setContentSize:(CGSize)contentSize;
48 |
49 | @end
50 |
51 |
52 |
--------------------------------------------------------------------------------
/PSSTableViewNoneData/PSSTableViewNoneData/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 |
--------------------------------------------------------------------------------
/PSSTableViewNoneData/PSSTableViewNoneData/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 |
--------------------------------------------------------------------------------
/PSSTableViewNoneData/PSSTableViewNoneData/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 |
--------------------------------------------------------------------------------
/PSSTableViewNoneData/PSSTableViewNoneData/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // PSSTableViewNoneData
4 | //
5 | // Created by 山和霞 on 17/4/26.
6 | // Copyright © 2017年 庞仕山. 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 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # PSSTableViewNoneData
2 | tableView没有数据时,需要展示占位图,如果项目还不成熟,没有这方面的机制,需要添加时,我们每一个使用了tableView的VC都添加代码,手动判断是否需要显示占位图,非常的麻烦,于是我就给UITableView 写了个categary, 只需要拖入文件到工程(连头文件都不需要导入),就可以完成项目中所有tableView的占位图的批量设置,非常舒服。[PSSTableViewNoneData (demo链接点击此处)](https://github.com/Pangshishan/PSSTableViewNoneData.git)
3 |
4 | #### 用到的技术
5 | - Runtime 方法交换(hook)
6 | - Runtime 给categary动态添加属性关联
7 | - categary的应用
8 |
9 | ### demo图片演示
10 |
11 | 
12 |
13 | 
14 |
15 | ### 使用方法:直接拖入工程
16 |
17 | ### 提供接口
18 | - 如果只是用到demo中默认的视图 或者 直接修改自定义的视图,则不需要导入头文件,拖进去就能用,需要修改实现的类名为:**PSSNoneDataView**
19 | - 如果需要手动设置自定义视图,或者需要手动设置视图的显现,则需要导入头文件:**UITableView+PSSNoneData**
20 | - 以下是提供的接口:
21 |
22 | ```Objective-C
23 | #import
24 | @class PSSNoneDataView;
25 | typedef enum : NSUInteger {
26 | PSSNoneDataStyleNone, // 关闭此机制
27 | PSSNoneDataStyleDefault, // 使用PSS默认的视图 (默认视图)
28 | PSSNoneDataStyleDIY, // 自定义DIY视图, 如果DIY视图为nil 使用PSS默认视图
29 | } PSSNoneDataStyle;
30 |
31 | // 这是默认的style, 默认是使用 PSS默认视图 的
32 | PSSNoneDataStyle PSS_DefaultStyle = PSSNoneDataStyleDefault;
33 |
34 | @interface UITableView (PSSNoneData)
35 |
36 | @property (nonatomic, assign) PSSNoneDataStyle pss_noneDataStyle;
37 |
38 | /*
39 | * 只在 PSSNoneDataStyleDIY 下生效
40 | * frame 或者 布局, 需要自己给定
41 | */
42 | @property (nonatomic, strong) UIView *pss_diyView;
43 |
44 | /*
45 | * 描述: 是否显示 无数据视图
46 | * 只在 非PSSNoneDataStyleNone并且pss_isManualShow==YES 时生效
47 | */
48 | @property (nonatomic, assign) BOOL pss_showNoneDataView;
49 | /*
50 | * 描述: 是否手动显示 无数据视图; 默认为NO
51 | */
52 | @property (nonatomic, assign) BOOL pss_isManualShow;
53 |
54 | // 默认视图, readonly
55 | @property (nonatomic, strong, readonly) PSSNoneDataView *pss_defaultView;
56 |
57 | @end
58 |
59 | @interface UIScrollView (PSS)
60 |
61 | - (void)pss_setContentSize:(CGSize)contentSize;
62 |
63 | @end
64 | ```
65 |
66 |
67 | 如果您感兴趣,想要查看.m文件,欢迎下载[PSSTableViewNoneData (demo链接点击此处)](https://github.com/Pangshishan/PSSTableViewNoneData.git)
68 |
69 | *如果觉得对您有帮助,就star一下吧。您的star就是对我最大的鼓励!
70 | 如果发现什么问题,或者有什么意见,请加我qq或微信:704158807
71 | 电子邮箱:pangshishan@aliyun.com*
72 |
--------------------------------------------------------------------------------
/PSSTableViewNoneData/PSSTableViewNoneData/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 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/PSSTableViewNoneData/PSSTableViewNoneData/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // PSSTableViewNoneData
4 | //
5 | // Created by 山和霞 on 17/4/26.
6 | // Copyright © 2017年 庞仕山. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "UITableView+PSSNoneData.h"
11 |
12 | #define kScreenWidth [UIScreen mainScreen].bounds.size.width
13 | #define kScreenHeight [UIScreen mainScreen].bounds.size.height
14 | #define kScreenSize [UIScreen mainScreen].bounds.size
15 | #define kWindows [[UIApplication sharedApplication].delegate window]
16 |
17 | @interface ViewController ()
18 |
19 | @property (nonatomic, strong) UITableView *tableView;
20 |
21 | @property (nonatomic, assign) NSInteger numberOfSections;
22 |
23 | @property (nonatomic, copy) NSArray *dataArr;
24 |
25 | @end
26 |
27 | @implementation ViewController
28 |
29 | - (void)viewDidLoad {
30 | [super viewDidLoad];
31 | // Do any additional setup after loading the view, typically from a nib.
32 |
33 | [self addTableViewInThis];
34 | [self dataArr];
35 | }
36 |
37 | #pragma mark - 添加tableView
38 | - (void)addTableViewInThis
39 | {
40 | UITableView *tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight - 50) style:UITableViewStyleGrouped];
41 | tableView.delegate = self;
42 | tableView.dataSource = self;
43 | [self.view addSubview:tableView];
44 | self.tableView = tableView;
45 | [tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cell"];
46 | }
47 | #pragma mark - tableView代理方法
48 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
49 | {
50 | return _dataArr ? _dataArr.count : 0;
51 | }
52 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
53 | {
54 | NSArray *arr = _dataArr ? _dataArr[section] : nil;
55 | return arr ? arr.count : 0;
56 | }
57 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
58 | {
59 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell" forIndexPath:indexPath];
60 | cell.textLabel.text = [NSString stringWithFormat:@"section=%ld row=%ld", indexPath.section, indexPath.row];
61 | return cell;
62 | }
63 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
64 | {
65 | return 50;
66 | }
67 | - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
68 | {
69 | return 10;
70 | }
71 | - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
72 | {
73 | return 0.1;
74 | }
75 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
76 | {
77 | [tableView deselectRowAtIndexPath:indexPath animated:NO];
78 | }
79 | - (IBAction)clickChangeData:(id)sender {
80 | UIButton *btn = (UIButton *)sender;
81 | NSString *title = _dataArr ? @"加载数据" : @"清空数据";
82 | [btn setTitle:title forState:UIControlStateNormal];
83 | if (_dataArr && _dataArr.count) {
84 | _dataArr = nil;
85 | [self.tableView reloadData];
86 | } else {
87 | [self dataArr];
88 | [self.tableView reloadData];
89 | }
90 | }
91 |
92 | - (NSArray *)dataArr
93 | {
94 | if (_dataArr == nil) {
95 | NSInteger numberOfSections = arc4random() % 5 + 1;
96 | NSInteger numberOfRows = arc4random() % 8 + 2;
97 | NSMutableArray *mArr = [NSMutableArray array];
98 | for (int i = 0; i < numberOfSections; i++) {
99 | NSMutableArray *mSubArr = [NSMutableArray array];
100 | for (int j = 0; j < numberOfRows; j++) {
101 | [mSubArr addObject:@""];
102 | }
103 | [mArr addObject:mSubArr];
104 | }
105 | _dataArr = mArr;
106 | }
107 | return _dataArr;
108 | }
109 |
110 | @end
111 |
--------------------------------------------------------------------------------
/PSSTableViewNoneData/PSSTableViewNoneDataSet/UITableView+PSSNoneData.m:
--------------------------------------------------------------------------------
1 | //
2 | // UITableView+PSSNoneData.m
3 | // PSSTableViewNoneData
4 | //
5 | // Created by 山和霞 on 17/4/26.
6 | // Copyright © 2017年 庞仕山. All rights reserved.
7 | //
8 |
9 | #import "UITableView+PSSNoneData.h"
10 | #import "PSSNoneDataView.h"
11 | #import
12 |
13 | // 这是默认的style, 默认是使用 PSS默认视图 的
14 | PSSNoneDataStyle PSS_DefaultStyle = PSSNoneDataStyleDefault;
15 |
16 | const NSString *Pss_Key_NoneDataStyle = @"Pss_Key_NoneDataStyle";
17 | const NSString *Pss_Key_ShowNoneDataView = @"Pss_Key_ShowNoneDataView";
18 | const NSString *Pss_Key_DefaultView = @"Pss_Key_DefaultView";
19 | const NSString *Pss_Key_DiyView = @"Pss_Key_DiyView";
20 | const NSString *Pss_Key_ManualShow = @"Pss_Key_ManualShow";
21 | const NSString *Pss_Key_AutoShowing = @"Pss_Key_AutoShowing";
22 |
23 | @interface UITableView ()
24 |
25 | @property (nonatomic, assign) BOOL isAutoShowing; // 记录自动判断是否显示
26 |
27 | @end
28 |
29 | @implementation UITableView (PSSNoneData)
30 |
31 | + (void)load
32 | {
33 | Method layoutSubviews = class_getInstanceMethod(self, @selector(layoutSubviews));
34 | Method pss_layoutSubviews = class_getInstanceMethod(self, @selector(pss_layoutSubviews));
35 | method_exchangeImplementations(layoutSubviews, pss_layoutSubviews);
36 |
37 | Method initWithFrame_style = class_getInstanceMethod(self, @selector(initWithFrame:style:));
38 | Method pss_initWithFrame_style = class_getInstanceMethod(self, @selector(pss_initWithFrame:style:));
39 | method_exchangeImplementations(initWithFrame_style, pss_initWithFrame_style);
40 | }
41 | - (instancetype)pss_initWithFrame:(CGRect)frame style:(UITableViewStyle)style
42 | {
43 | UITableView *tableView = [self pss_initWithFrame:frame style:style];
44 | tableView.pss_noneDataStyle = PSS_DefaultStyle;
45 | return tableView;
46 | }
47 | - (void)pss_setContentSize:(CGSize)contentSize
48 | {
49 | [super pss_setContentSize:contentSize];
50 | BOOL isHavingData = NO; // tableView中是否有数据
51 | NSInteger numberOfSections = [self numberOfSections];
52 | for (NSInteger i = 0; i < numberOfSections; i++) {
53 | if ([self numberOfRowsInSection:i] > 0) {
54 | isHavingData = YES;
55 | }
56 | }
57 | self.isAutoShowing = !isHavingData;
58 | [self judgeNowStateWithShow:!isHavingData];
59 | }
60 |
61 | - (void)pss_layoutSubviews
62 | {
63 | [self pss_layoutSubviews];
64 | [self bringSubviewToFront:self.pss_defaultView];
65 | self.pss_defaultView.frame = self.bounds;
66 | if (self.pss_diyView) {
67 | [self bringSubviewToFront:self.pss_diyView];
68 | }
69 | }
70 | - (void)judgeNowStateWithShow:(BOOL)show
71 | {
72 | switch (self.pss_noneDataStyle) {
73 | case PSSNoneDataStyleNone:
74 | self.pss_defaultView.hidden = YES;
75 | if (self.pss_diyView) {
76 | self.pss_diyView.hidden = YES;
77 | }
78 | break;
79 | case PSSNoneDataStyleDefault:
80 | if (self.pss_diyView) {
81 | self.pss_diyView.hidden = YES;
82 | }
83 | self.pss_defaultView.hidden = self.pss_isManualShow ? !self.pss_showNoneDataView : !show;
84 | break;
85 | case PSSNoneDataStyleDIY:
86 | if (self.pss_diyView) {
87 | self.pss_defaultView.hidden = NO;
88 | self.pss_diyView.hidden = self.pss_isManualShow ? !self.pss_showNoneDataView : !show;;
89 | } else {
90 | self.pss_defaultView.hidden = self.pss_isManualShow ? !self.pss_showNoneDataView : !show;
91 | }
92 | break;
93 | default:
94 | break;
95 | }
96 | }
97 | #pragma mark - setter + gatter
98 | - (void)setPss_diyView:(UIView *)pss_diyView
99 | {
100 | if (self.pss_diyView) {
101 | [self.pss_diyView removeFromSuperview];
102 | }
103 | [self addSubview:pss_diyView];
104 | objc_setAssociatedObject(self, (__bridge const void *)(Pss_Key_DiyView), pss_diyView, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
105 | }
106 | - (UIView *)pss_diyView
107 | {
108 | return objc_getAssociatedObject(self, (__bridge const void *)(Pss_Key_DiyView));
109 | }
110 |
111 | - (void)setPss_defaultView:(PSSNoneDataView *)pss_defaultView
112 | {
113 | objc_setAssociatedObject(self, (__bridge const void *)(Pss_Key_DefaultView), pss_defaultView, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
114 | }
115 | - (PSSNoneDataView *)pss_defaultView
116 | {
117 | PSSNoneDataView *defaultView = objc_getAssociatedObject(self, (__bridge const void *)(Pss_Key_DefaultView));
118 | if (!defaultView) {
119 | defaultView = [[PSSNoneDataView alloc] init];
120 | defaultView.hidden = YES;
121 | [self addSubview:defaultView];
122 | objc_setAssociatedObject(self, (__bridge const void *)(Pss_Key_DefaultView), defaultView, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
123 | }
124 | return defaultView;
125 | }
126 |
127 | - (void)setPss_showNoneDataView:(BOOL)pss_showNoneDataView
128 | {
129 | objc_setAssociatedObject(self, (__bridge const void *)(Pss_Key_ShowNoneDataView), @(pss_showNoneDataView), OBJC_ASSOCIATION_ASSIGN);
130 | if (self.pss_isManualShow) {
131 | [self judgeNowStateWithShow:pss_showNoneDataView];
132 | }
133 | }
134 | - (BOOL)pss_showNoneDataView
135 | {
136 | return [objc_getAssociatedObject(self, (__bridge const void *)(Pss_Key_ShowNoneDataView)) intValue];
137 | }
138 |
139 | - (void)setPss_noneDataStyle:(PSSNoneDataStyle)pss_noneDataStyle
140 | {
141 | objc_setAssociatedObject(self, (__bridge const void *)(Pss_Key_NoneDataStyle), @(pss_noneDataStyle), OBJC_ASSOCIATION_ASSIGN);
142 | }
143 | - (PSSNoneDataStyle)pss_noneDataStyle
144 | {
145 | return [objc_getAssociatedObject(self, (__bridge const void *)(Pss_Key_NoneDataStyle)) intValue];
146 | }
147 |
148 | - (void)setPss_isManualShow:(BOOL)pss_isManualShow
149 | {
150 | objc_setAssociatedObject(self, (__bridge const void *)(Pss_Key_ManualShow), @(pss_isManualShow), OBJC_ASSOCIATION_ASSIGN);
151 | [self judgeNowStateWithShow:pss_isManualShow ? self.pss_showNoneDataView :self.isAutoShowing];
152 | }
153 | - (BOOL)pss_isManualShow
154 | {
155 | return [objc_getAssociatedObject(self, (__bridge const void *)(Pss_Key_ManualShow)) boolValue];
156 | }
157 |
158 | - (void)setIsAutoShowing:(BOOL)isAutoShowing
159 | {
160 | objc_setAssociatedObject(self, (__bridge const void *)(Pss_Key_AutoShowing), @(isAutoShowing), OBJC_ASSOCIATION_ASSIGN);
161 | }
162 | - (BOOL)isAutoShowing
163 | {
164 | return [objc_getAssociatedObject(self, (__bridge const void *)(Pss_Key_AutoShowing)) boolValue];
165 | }
166 |
167 | @end
168 |
169 | @implementation UIScrollView (PSS)
170 |
171 | + (void)load
172 | {
173 | Method setContentSize = class_getInstanceMethod(self, @selector(setContentSize:));
174 | Method pss_setContentSize = class_getInstanceMethod(self, @selector(pss_setContentSize:));
175 | method_exchangeImplementations(setContentSize, pss_setContentSize);
176 | }
177 |
178 | - (void)pss_setContentSize:(CGSize)contentSize
179 | {
180 | [self pss_setContentSize:contentSize];
181 | }
182 |
183 | @end
184 |
185 |
186 |
187 |
--------------------------------------------------------------------------------
/PSSTableViewNoneData/PSSTableViewNoneData.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 8952E6211EB0A3FC00FE6E53 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 8952E6201EB0A3FC00FE6E53 /* main.m */; };
11 | 8952E6241EB0A3FC00FE6E53 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8952E6231EB0A3FC00FE6E53 /* AppDelegate.m */; };
12 | 8952E6271EB0A3FC00FE6E53 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8952E6261EB0A3FC00FE6E53 /* ViewController.m */; };
13 | 8952E62A1EB0A3FC00FE6E53 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8952E6281EB0A3FC00FE6E53 /* Main.storyboard */; };
14 | 8952E62C1EB0A3FC00FE6E53 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8952E62B1EB0A3FC00FE6E53 /* Assets.xcassets */; };
15 | 8952E62F1EB0A3FC00FE6E53 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8952E62D1EB0A3FC00FE6E53 /* LaunchScreen.storyboard */; };
16 | B66321C61EC43957005651F3 /* PSSNoneDataView.m in Sources */ = {isa = PBXBuildFile; fileRef = B66321C31EC43957005651F3 /* PSSNoneDataView.m */; };
17 | B66321C71EC43957005651F3 /* UITableView+PSSNoneData.m in Sources */ = {isa = PBXBuildFile; fileRef = B66321C51EC43957005651F3 /* UITableView+PSSNoneData.m */; };
18 | /* End PBXBuildFile section */
19 |
20 | /* Begin PBXFileReference section */
21 | 8952E61C1EB0A3FC00FE6E53 /* PSSTableViewNoneData.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PSSTableViewNoneData.app; sourceTree = BUILT_PRODUCTS_DIR; };
22 | 8952E6201EB0A3FC00FE6E53 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
23 | 8952E6221EB0A3FC00FE6E53 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
24 | 8952E6231EB0A3FC00FE6E53 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
25 | 8952E6251EB0A3FC00FE6E53 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
26 | 8952E6261EB0A3FC00FE6E53 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
27 | 8952E6291EB0A3FC00FE6E53 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
28 | 8952E62B1EB0A3FC00FE6E53 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
29 | 8952E62E1EB0A3FC00FE6E53 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
30 | 8952E6301EB0A3FC00FE6E53 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
31 | B66321C21EC43957005651F3 /* PSSNoneDataView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PSSNoneDataView.h; sourceTree = ""; };
32 | B66321C31EC43957005651F3 /* PSSNoneDataView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PSSNoneDataView.m; sourceTree = ""; };
33 | B66321C41EC43957005651F3 /* UITableView+PSSNoneData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UITableView+PSSNoneData.h"; sourceTree = ""; };
34 | B66321C51EC43957005651F3 /* UITableView+PSSNoneData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UITableView+PSSNoneData.m"; sourceTree = ""; };
35 | /* End PBXFileReference section */
36 |
37 | /* Begin PBXFrameworksBuildPhase section */
38 | 8952E6191EB0A3FC00FE6E53 /* Frameworks */ = {
39 | isa = PBXFrameworksBuildPhase;
40 | buildActionMask = 2147483647;
41 | files = (
42 | );
43 | runOnlyForDeploymentPostprocessing = 0;
44 | };
45 | /* End PBXFrameworksBuildPhase section */
46 |
47 | /* Begin PBXGroup section */
48 | 8952E6131EB0A3FC00FE6E53 = {
49 | isa = PBXGroup;
50 | children = (
51 | 8952E61E1EB0A3FC00FE6E53 /* PSSTableViewNoneData */,
52 | 8952E61D1EB0A3FC00FE6E53 /* Products */,
53 | );
54 | sourceTree = "";
55 | };
56 | 8952E61D1EB0A3FC00FE6E53 /* Products */ = {
57 | isa = PBXGroup;
58 | children = (
59 | 8952E61C1EB0A3FC00FE6E53 /* PSSTableViewNoneData.app */,
60 | );
61 | name = Products;
62 | sourceTree = "";
63 | };
64 | 8952E61E1EB0A3FC00FE6E53 /* PSSTableViewNoneData */ = {
65 | isa = PBXGroup;
66 | children = (
67 | 8952E6221EB0A3FC00FE6E53 /* AppDelegate.h */,
68 | 8952E6231EB0A3FC00FE6E53 /* AppDelegate.m */,
69 | 8952E6251EB0A3FC00FE6E53 /* ViewController.h */,
70 | 8952E6261EB0A3FC00FE6E53 /* ViewController.m */,
71 | B66321C01EC43957005651F3 /* PSSTableViewNoneDataSet */,
72 | 8952E6281EB0A3FC00FE6E53 /* Main.storyboard */,
73 | 8952E62B1EB0A3FC00FE6E53 /* Assets.xcassets */,
74 | 8952E62D1EB0A3FC00FE6E53 /* LaunchScreen.storyboard */,
75 | 8952E6301EB0A3FC00FE6E53 /* Info.plist */,
76 | 8952E61F1EB0A3FC00FE6E53 /* Supporting Files */,
77 | );
78 | path = PSSTableViewNoneData;
79 | sourceTree = "";
80 | };
81 | 8952E61F1EB0A3FC00FE6E53 /* Supporting Files */ = {
82 | isa = PBXGroup;
83 | children = (
84 | 8952E6201EB0A3FC00FE6E53 /* main.m */,
85 | );
86 | name = "Supporting Files";
87 | sourceTree = "";
88 | };
89 | B66321C01EC43957005651F3 /* PSSTableViewNoneDataSet */ = {
90 | isa = PBXGroup;
91 | children = (
92 | B66321C11EC43957005651F3 /* PSSNoneDataView */,
93 | B66321C41EC43957005651F3 /* UITableView+PSSNoneData.h */,
94 | B66321C51EC43957005651F3 /* UITableView+PSSNoneData.m */,
95 | );
96 | path = PSSTableViewNoneDataSet;
97 | sourceTree = SOURCE_ROOT;
98 | };
99 | B66321C11EC43957005651F3 /* PSSNoneDataView */ = {
100 | isa = PBXGroup;
101 | children = (
102 | B66321C21EC43957005651F3 /* PSSNoneDataView.h */,
103 | B66321C31EC43957005651F3 /* PSSNoneDataView.m */,
104 | );
105 | path = PSSNoneDataView;
106 | sourceTree = "";
107 | };
108 | /* End PBXGroup section */
109 |
110 | /* Begin PBXNativeTarget section */
111 | 8952E61B1EB0A3FC00FE6E53 /* PSSTableViewNoneData */ = {
112 | isa = PBXNativeTarget;
113 | buildConfigurationList = 8952E6331EB0A3FC00FE6E53 /* Build configuration list for PBXNativeTarget "PSSTableViewNoneData" */;
114 | buildPhases = (
115 | 8952E6181EB0A3FC00FE6E53 /* Sources */,
116 | 8952E6191EB0A3FC00FE6E53 /* Frameworks */,
117 | 8952E61A1EB0A3FC00FE6E53 /* Resources */,
118 | );
119 | buildRules = (
120 | );
121 | dependencies = (
122 | );
123 | name = PSSTableViewNoneData;
124 | productName = PSSTableViewNoneData;
125 | productReference = 8952E61C1EB0A3FC00FE6E53 /* PSSTableViewNoneData.app */;
126 | productType = "com.apple.product-type.application";
127 | };
128 | /* End PBXNativeTarget section */
129 |
130 | /* Begin PBXProject section */
131 | 8952E6141EB0A3FC00FE6E53 /* Project object */ = {
132 | isa = PBXProject;
133 | attributes = {
134 | LastUpgradeCheck = 0820;
135 | ORGANIZATIONNAME = "庞仕山";
136 | TargetAttributes = {
137 | 8952E61B1EB0A3FC00FE6E53 = {
138 | CreatedOnToolsVersion = 8.2.1;
139 | DevelopmentTeam = XRP5EB8YU5;
140 | ProvisioningStyle = Automatic;
141 | };
142 | };
143 | };
144 | buildConfigurationList = 8952E6171EB0A3FC00FE6E53 /* Build configuration list for PBXProject "PSSTableViewNoneData" */;
145 | compatibilityVersion = "Xcode 3.2";
146 | developmentRegion = English;
147 | hasScannedForEncodings = 0;
148 | knownRegions = (
149 | en,
150 | Base,
151 | );
152 | mainGroup = 8952E6131EB0A3FC00FE6E53;
153 | productRefGroup = 8952E61D1EB0A3FC00FE6E53 /* Products */;
154 | projectDirPath = "";
155 | projectRoot = "";
156 | targets = (
157 | 8952E61B1EB0A3FC00FE6E53 /* PSSTableViewNoneData */,
158 | );
159 | };
160 | /* End PBXProject section */
161 |
162 | /* Begin PBXResourcesBuildPhase section */
163 | 8952E61A1EB0A3FC00FE6E53 /* Resources */ = {
164 | isa = PBXResourcesBuildPhase;
165 | buildActionMask = 2147483647;
166 | files = (
167 | 8952E62F1EB0A3FC00FE6E53 /* LaunchScreen.storyboard in Resources */,
168 | 8952E62C1EB0A3FC00FE6E53 /* Assets.xcassets in Resources */,
169 | 8952E62A1EB0A3FC00FE6E53 /* Main.storyboard in Resources */,
170 | );
171 | runOnlyForDeploymentPostprocessing = 0;
172 | };
173 | /* End PBXResourcesBuildPhase section */
174 |
175 | /* Begin PBXSourcesBuildPhase section */
176 | 8952E6181EB0A3FC00FE6E53 /* Sources */ = {
177 | isa = PBXSourcesBuildPhase;
178 | buildActionMask = 2147483647;
179 | files = (
180 | 8952E6271EB0A3FC00FE6E53 /* ViewController.m in Sources */,
181 | 8952E6241EB0A3FC00FE6E53 /* AppDelegate.m in Sources */,
182 | B66321C71EC43957005651F3 /* UITableView+PSSNoneData.m in Sources */,
183 | 8952E6211EB0A3FC00FE6E53 /* main.m in Sources */,
184 | B66321C61EC43957005651F3 /* PSSNoneDataView.m in Sources */,
185 | );
186 | runOnlyForDeploymentPostprocessing = 0;
187 | };
188 | /* End PBXSourcesBuildPhase section */
189 |
190 | /* Begin PBXVariantGroup section */
191 | 8952E6281EB0A3FC00FE6E53 /* Main.storyboard */ = {
192 | isa = PBXVariantGroup;
193 | children = (
194 | 8952E6291EB0A3FC00FE6E53 /* Base */,
195 | );
196 | name = Main.storyboard;
197 | sourceTree = "";
198 | };
199 | 8952E62D1EB0A3FC00FE6E53 /* LaunchScreen.storyboard */ = {
200 | isa = PBXVariantGroup;
201 | children = (
202 | 8952E62E1EB0A3FC00FE6E53 /* Base */,
203 | );
204 | name = LaunchScreen.storyboard;
205 | sourceTree = "";
206 | };
207 | /* End PBXVariantGroup section */
208 |
209 | /* Begin XCBuildConfiguration section */
210 | 8952E6311EB0A3FC00FE6E53 /* Debug */ = {
211 | isa = XCBuildConfiguration;
212 | buildSettings = {
213 | ALWAYS_SEARCH_USER_PATHS = NO;
214 | CLANG_ANALYZER_NONNULL = YES;
215 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
216 | CLANG_CXX_LIBRARY = "libc++";
217 | CLANG_ENABLE_MODULES = YES;
218 | CLANG_ENABLE_OBJC_ARC = YES;
219 | CLANG_WARN_BOOL_CONVERSION = YES;
220 | CLANG_WARN_CONSTANT_CONVERSION = YES;
221 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
222 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
223 | CLANG_WARN_EMPTY_BODY = YES;
224 | CLANG_WARN_ENUM_CONVERSION = YES;
225 | CLANG_WARN_INFINITE_RECURSION = YES;
226 | CLANG_WARN_INT_CONVERSION = YES;
227 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
228 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
229 | CLANG_WARN_UNREACHABLE_CODE = YES;
230 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
231 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
232 | COPY_PHASE_STRIP = NO;
233 | DEBUG_INFORMATION_FORMAT = dwarf;
234 | ENABLE_STRICT_OBJC_MSGSEND = YES;
235 | ENABLE_TESTABILITY = YES;
236 | GCC_C_LANGUAGE_STANDARD = gnu99;
237 | GCC_DYNAMIC_NO_PIC = NO;
238 | GCC_NO_COMMON_BLOCKS = YES;
239 | GCC_OPTIMIZATION_LEVEL = 0;
240 | GCC_PREPROCESSOR_DEFINITIONS = (
241 | "DEBUG=1",
242 | "$(inherited)",
243 | );
244 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
245 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
246 | GCC_WARN_UNDECLARED_SELECTOR = YES;
247 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
248 | GCC_WARN_UNUSED_FUNCTION = YES;
249 | GCC_WARN_UNUSED_VARIABLE = YES;
250 | IPHONEOS_DEPLOYMENT_TARGET = 10.2;
251 | MTL_ENABLE_DEBUG_INFO = YES;
252 | ONLY_ACTIVE_ARCH = YES;
253 | SDKROOT = iphoneos;
254 | TARGETED_DEVICE_FAMILY = "1,2";
255 | };
256 | name = Debug;
257 | };
258 | 8952E6321EB0A3FC00FE6E53 /* Release */ = {
259 | isa = XCBuildConfiguration;
260 | buildSettings = {
261 | ALWAYS_SEARCH_USER_PATHS = NO;
262 | CLANG_ANALYZER_NONNULL = YES;
263 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
264 | CLANG_CXX_LIBRARY = "libc++";
265 | CLANG_ENABLE_MODULES = YES;
266 | CLANG_ENABLE_OBJC_ARC = YES;
267 | CLANG_WARN_BOOL_CONVERSION = YES;
268 | CLANG_WARN_CONSTANT_CONVERSION = YES;
269 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
270 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
271 | CLANG_WARN_EMPTY_BODY = YES;
272 | CLANG_WARN_ENUM_CONVERSION = YES;
273 | CLANG_WARN_INFINITE_RECURSION = YES;
274 | CLANG_WARN_INT_CONVERSION = YES;
275 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
276 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
277 | CLANG_WARN_UNREACHABLE_CODE = YES;
278 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
279 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
280 | COPY_PHASE_STRIP = NO;
281 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
282 | ENABLE_NS_ASSERTIONS = NO;
283 | ENABLE_STRICT_OBJC_MSGSEND = YES;
284 | GCC_C_LANGUAGE_STANDARD = gnu99;
285 | GCC_NO_COMMON_BLOCKS = YES;
286 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
287 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
288 | GCC_WARN_UNDECLARED_SELECTOR = YES;
289 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
290 | GCC_WARN_UNUSED_FUNCTION = YES;
291 | GCC_WARN_UNUSED_VARIABLE = YES;
292 | IPHONEOS_DEPLOYMENT_TARGET = 10.2;
293 | MTL_ENABLE_DEBUG_INFO = NO;
294 | SDKROOT = iphoneos;
295 | TARGETED_DEVICE_FAMILY = "1,2";
296 | VALIDATE_PRODUCT = YES;
297 | };
298 | name = Release;
299 | };
300 | 8952E6341EB0A3FC00FE6E53 /* Debug */ = {
301 | isa = XCBuildConfiguration;
302 | buildSettings = {
303 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
304 | DEVELOPMENT_TEAM = XRP5EB8YU5;
305 | INFOPLIST_FILE = PSSTableViewNoneData/Info.plist;
306 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
307 | PRODUCT_BUNDLE_IDENTIFIER = com.pangshishan.PSSTableViewNoneData;
308 | PRODUCT_NAME = "$(TARGET_NAME)";
309 | };
310 | name = Debug;
311 | };
312 | 8952E6351EB0A3FC00FE6E53 /* Release */ = {
313 | isa = XCBuildConfiguration;
314 | buildSettings = {
315 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
316 | DEVELOPMENT_TEAM = XRP5EB8YU5;
317 | INFOPLIST_FILE = PSSTableViewNoneData/Info.plist;
318 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
319 | PRODUCT_BUNDLE_IDENTIFIER = com.pangshishan.PSSTableViewNoneData;
320 | PRODUCT_NAME = "$(TARGET_NAME)";
321 | };
322 | name = Release;
323 | };
324 | /* End XCBuildConfiguration section */
325 |
326 | /* Begin XCConfigurationList section */
327 | 8952E6171EB0A3FC00FE6E53 /* Build configuration list for PBXProject "PSSTableViewNoneData" */ = {
328 | isa = XCConfigurationList;
329 | buildConfigurations = (
330 | 8952E6311EB0A3FC00FE6E53 /* Debug */,
331 | 8952E6321EB0A3FC00FE6E53 /* Release */,
332 | );
333 | defaultConfigurationIsVisible = 0;
334 | defaultConfigurationName = Release;
335 | };
336 | 8952E6331EB0A3FC00FE6E53 /* Build configuration list for PBXNativeTarget "PSSTableViewNoneData" */ = {
337 | isa = XCConfigurationList;
338 | buildConfigurations = (
339 | 8952E6341EB0A3FC00FE6E53 /* Debug */,
340 | 8952E6351EB0A3FC00FE6E53 /* Release */,
341 | );
342 | defaultConfigurationIsVisible = 0;
343 | defaultConfigurationName = Release;
344 | };
345 | /* End XCConfigurationList section */
346 | };
347 | rootObject = 8952E6141EB0A3FC00FE6E53 /* Project object */;
348 | }
349 |
--------------------------------------------------------------------------------