Commit 60df56ee1424efde5d38075f48522895a40b3ae1
1 parent
cf20a399
0.0.2
Showing
100 changed files
with
4453 additions
and
0 deletions
Too many changes to show.
To preserve performance only 100 of 336 files are displayed.
.gitignore
0 → 100644
CNLiveSubsList.podspec
0 → 100644
| 1 | +# | |
| 2 | +# Be sure to run `pod lib lint CNLiveSubsList.podspec' to ensure this is a | |
| 3 | +# valid spec before submitting. | |
| 4 | +# | |
| 5 | +# Any lines starting with a # are optional, but their use is encouraged | |
| 6 | +# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html | |
| 7 | +# | |
| 8 | + | |
| 9 | +Pod::Spec.new do |s| | |
| 10 | + s.name = 'CNLiveSubsList' | |
| 11 | + s.version = '0.0.2' | |
| 12 | + s.summary = 'A short description of CNLiveSubsList.' | |
| 13 | + | |
| 14 | +# This description is used to generate tags and improve search results. | |
| 15 | +# * Think: What does it do? Why did you write it? What is the focus? | |
| 16 | +# * Try to keep it short, snappy and to the point. | |
| 17 | +# * Write the description between the DESC delimiters below. | |
| 18 | +# * Finally, don't worry about the indent, CocoaPods strips it! | |
| 19 | + | |
| 20 | + s.description = <<-DESC | |
| 21 | +TODO: Add long description of the pod here. | |
| 22 | + DESC | |
| 23 | + | |
| 24 | + s.homepage = 'http://bj.gitlab.cnlive.com/ios-team/CNLiveSubsList' | |
| 25 | + # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2' | |
| 26 | + s.license = { :type => 'MIT', :file => 'LICENSE' } | |
| 27 | + s.author = { '殷巧娟' => '1427945373@qq.com' } | |
| 28 | + s.source = { :git => 'http://bj.gitlab.cnlive.com/ios-team/CNLiveSubsList.git', :tag => s.version.to_s } | |
| 29 | + # s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>' | |
| 30 | + | |
| 31 | + s.ios.deployment_target = '9.0' | |
| 32 | + | |
| 33 | + s.source_files = 'CNLiveSubsList/Classes/**/*' | |
| 34 | + | |
| 35 | + s.resource_bundles = { | |
| 36 | + 'CNLiveSubsList' => ['CNLiveSubsList/Assets/Assets.xcassets'] | |
| 37 | + } | |
| 38 | + | |
| 39 | + # s.public_header_files = 'Pod/Classes/**/*.h' | |
| 40 | + s.frameworks = 'UIKit', 'Foundation' | |
| 41 | + s.dependency 'QMUIKit' | |
| 42 | + s.dependency 'Masonry' | |
| 43 | + s.dependency 'Realm', '~> 2.9.1' | |
| 44 | + s.dependency 'CNLiveCommonCategory' | |
| 45 | + s.dependency 'SDWebImage' | |
| 46 | + s.dependency 'CNLiveBaseKit' | |
| 47 | + s.dependency 'CNLiveRequestBastKit' | |
| 48 | + s.dependency 'MJExtension' | |
| 49 | +end | ... | ... |
CNLiveSubsList/Assets/Assets.xcassets/Contents.json
0 → 100644
CNLiveSubsList/Assets/Assets.xcassets/sh_dingdan.imageset/Contents.json
0 → 100644
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "universal", | |
| 5 | + "filename" : "sh_dingdan.png", | |
| 6 | + "scale" : "1x" | |
| 7 | + }, | |
| 8 | + { | |
| 9 | + "idiom" : "universal", | |
| 10 | + "filename" : "sh_dingdan@2x.png", | |
| 11 | + "scale" : "2x" | |
| 12 | + }, | |
| 13 | + { | |
| 14 | + "idiom" : "universal", | |
| 15 | + "filename" : "sh_dingdan@3x.png", | |
| 16 | + "scale" : "3x" | |
| 17 | + } | |
| 18 | + ], | |
| 19 | + "info" : { | |
| 20 | + "version" : 1, | |
| 21 | + "author" : "xcode" | |
| 22 | + } | |
| 23 | +} | |
| 0 | 24 | \ No newline at end of file | ... | ... |
CNLiveSubsList/Assets/Assets.xcassets/sh_dingdan.imageset/sh_dingdan.png
0 → 100644
2.38 KB
CNLiveSubsList/Assets/Assets.xcassets/sh_dingdan.imageset/sh_dingdan@2x.png
0 → 100644
4.05 KB
CNLiveSubsList/Assets/Assets.xcassets/sh_dingdan.imageset/sh_dingdan@3x.png
0 → 100644
5.43 KB
CNLiveSubsList/Assets/Assets.xcassets/touxiang2.imageset/Contents.json
0 → 100644
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "universal", | |
| 5 | + "filename" : "touxiang2.png", | |
| 6 | + "scale" : "1x" | |
| 7 | + }, | |
| 8 | + { | |
| 9 | + "idiom" : "universal", | |
| 10 | + "filename" : "touxiang2@2x.png", | |
| 11 | + "scale" : "2x" | |
| 12 | + }, | |
| 13 | + { | |
| 14 | + "idiom" : "universal", | |
| 15 | + "filename" : "touxiang2@3x.png", | |
| 16 | + "scale" : "3x" | |
| 17 | + } | |
| 18 | + ], | |
| 19 | + "info" : { | |
| 20 | + "version" : 1, | |
| 21 | + "author" : "xcode" | |
| 22 | + } | |
| 23 | +} | |
| 0 | 24 | \ No newline at end of file | ... | ... |
CNLiveSubsList/Assets/Assets.xcassets/touxiang2.imageset/touxiang2.png
0 → 100644
2.99 KB
CNLiveSubsList/Assets/Assets.xcassets/touxiang2.imageset/touxiang2@2x.png
0 → 100644
4.4 KB
CNLiveSubsList/Assets/Assets.xcassets/touxiang2.imageset/touxiang2@3x.png
0 → 100644
9.71 KB
CNLiveSubsList/Classes/Controller/CNLiveSubsListViewController.h
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveSubsListViewController.h | |
| 3 | +// CNLiveSubsList | |
| 4 | +// | |
| 5 | +// Created by 殷巧娟 on 2019/2/18. | |
| 6 | +// | |
| 7 | + | |
| 8 | +#import <QMUIKit/QMUIKit.h> | |
| 9 | +#import "CNLiveSubscribeCell.h" | |
| 10 | +NS_ASSUME_NONNULL_BEGIN | |
| 11 | + | |
| 12 | +@interface CNLiveSubsListViewController : QMUICommonTableViewController | |
| 13 | +- (instancetype)initWithType:(SubsType)type param:(NSDictionary *)param; | |
| 14 | +@end | |
| 15 | + | |
| 16 | +NS_ASSUME_NONNULL_END | ... | ... |
CNLiveSubsList/Classes/Controller/CNLiveSubsListViewController.m
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveSubsListViewController.m | |
| 3 | +// CNLiveSubsList | |
| 4 | +// | |
| 5 | +// Created by 殷巧娟 on 2019/2/18. | |
| 6 | +// | |
| 7 | + | |
| 8 | +#import "CNLiveSubsListViewController.h" | |
| 9 | +#import "CNLiveSubsModel.h" | |
| 10 | +#import <QMUIKit/QMUIKit.h> | |
| 11 | +#import <CNLiveBaseKit/CNLiveBaseKit.h> | |
| 12 | +#import <CNLiveRequestBastKit/CNLiveNetworking.h> | |
| 13 | +#import <MJExtension/MJExtension.h> | |
| 14 | +#import <Realm/Realm.h> | |
| 15 | +#import "CNLiveSubscribeCell.h" | |
| 16 | +#define API_Host @"https://apiwjjtest.cnlive.com" | |
| 17 | +//获取达人号列表 | |
| 18 | +static NSString *const CNGetDarenSubsUrl = API_Host@"/Daren/sub/getDarenSubs.action"; | |
| 19 | +//获取生活号列表 | |
| 20 | +static NSString *const CNGetLifeSubsUrl = API_Host@"/Daren/sub/getLifeSubs.action"; | |
| 21 | +//达人列表表名 | |
| 22 | +static NSString *const DarenSubsRealm = @"DarenSubs"; | |
| 23 | +//生活列表表名 | |
| 24 | +static NSString *const LifeSubsRealm = @"LifeSubs"; | |
| 25 | +// 弱引用 | |
| 26 | +#define MJWeakSelf __weak typeof(self) weakSelf = self; | |
| 27 | +static NSString *errorCode = @"errorCode"; | |
| 28 | +static NSString *errorMessage = @"errorMessage"; | |
| 29 | +static NSString *requestData = @"data"; | |
| 30 | +@interface CNLiveSubsListViewController ()<QMUISearchControllerDelegate> { | |
| 31 | +// SubsType _type; | |
| 32 | +// UILabel *_numDarenLbl; | |
| 33 | +} | |
| 34 | +@property (nonatomic, assign) SubsType type; | |
| 35 | +@property (nonatomic, strong) UILabel *numDarenLbl; | |
| 36 | +@property (nonatomic, strong) NSMutableArray<NSString *> *searchResultsKeywords; | |
| 37 | +@property (nonatomic, strong) QMUISearchController *mySearchController; | |
| 38 | +@property (nonatomic, strong) NSMutableArray <CNLiveSubsModel *>* subsArr;//数据源 | |
| 39 | +@property (nonatomic, strong) NSDictionary *param;// 传入的字典 | |
| 40 | +@end | |
| 41 | + | |
| 42 | +@implementation CNLiveSubsListViewController | |
| 43 | +- (void)dealloc | |
| 44 | +{ | |
| 45 | + NSLog(@"CNSubsListViewController释放了"); | |
| 46 | +} | |
| 47 | +- (instancetype)initWithType:(SubsType)type param:(nonnull NSDictionary *)param{ | |
| 48 | + if (self = [super init]) { | |
| 49 | + if (type == SubsTypeDaren) { | |
| 50 | + self.title = @"达人号"; | |
| 51 | + }else if (type == SubsTypeLife) { | |
| 52 | + self.title = @"生活号"; | |
| 53 | + } | |
| 54 | + _type = type; | |
| 55 | + self.param = param; | |
| 56 | + self.searchResultsKeywords = [[NSMutableArray alloc]init]; | |
| 57 | + self.subsArr = [[NSMutableArray alloc]init]; | |
| 58 | + } | |
| 59 | + | |
| 60 | + return self; | |
| 61 | +} | |
| 62 | +- (void)viewWillAppear:(BOOL)animated { | |
| 63 | + [super viewWillAppear:animated]; | |
| 64 | + self.navigationController.navigationBarHidden = NO; | |
| 65 | + [self loadData]; | |
| 66 | + | |
| 67 | +} | |
| 68 | +- (void)initSubviews { | |
| 69 | + [super initSubviews]; | |
| 70 | +} | |
| 71 | +- (void)viewDidLayoutSubviews { | |
| 72 | + [super viewDidLayoutSubviews]; | |
| 73 | + self.tableView.top = kNavigationBarHeight; | |
| 74 | + self.tableView.height = KScreenWidth - kNavigationBarHeight; | |
| 75 | +} | |
| 76 | +- (void)viewDidLoad { | |
| 77 | + [super viewDidLoad]; | |
| 78 | + // Do any additional setup after loading the view. | |
| 79 | +} | |
| 80 | +- (void)loadData { | |
| 81 | + [self hideEmptyView]; | |
| 82 | + MJWeakSelf | |
| 83 | + NSString *urlStr = @""; | |
| 84 | + if (_type == SubsTypeDaren) { | |
| 85 | + urlStr = CNGetDarenSubsUrl; | |
| 86 | + }else if (_type == SubsTypeLife) { | |
| 87 | + urlStr = CNGetLifeSubsUrl; | |
| 88 | + } | |
| 89 | + [QMUITips showLoading:@"加载中..." inView:self.view hideAfterDelay:2]; | |
| 90 | + [CNLiveNetworking setAllowRequestDefaultArgument:YES]; | |
| 91 | + [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodPOST URLString:urlStr Param:self.param CacheType:CNLiveNetworkCacheTypeCacheNetwork CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) { | |
| 92 | + if (error) { | |
| 93 | + if (self.subsArr.count > 0) { | |
| 94 | + if (error.code != - 1009) { | |
| 95 | + [QMUITips showError:error.localizedDescription inView:self.view hideAfterDelay:1.5]; | |
| 96 | + } | |
| 97 | + }else { | |
| 98 | + if (error.code != -1001) { | |
| 99 | + [self showEmptyViewWithImage:[UIImage imageNamed:@"wufalianjie"] text:@"网络连接失败,请稍后再试" detailText:@"别紧张,试试看刷新页面~" buttonTitle:@" 重试 " buttonAction:@selector(loadData)]; | |
| 100 | + [self setCNAPIErrorEmptyView]; | |
| 101 | + }else{ | |
| 102 | + [self showEmptyViewWithImage:[UIImage imageNamed:@"dd_wlcw"] text:@"无法连接网络" detailText:@"别紧张,试试看刷新页面~" buttonTitle:@" 重试 " buttonAction:@selector(loadData)]; | |
| 103 | + [self setCNAPIErrorEmptyView]; | |
| 104 | + } | |
| 105 | + } | |
| 106 | + return ; | |
| 107 | + } | |
| 108 | + NSDictionary * responseObjectDic = [responseObject mj_keyValues]; | |
| 109 | + NSString *resultCode = [NSString stringWithFormat:@"%@", responseObjectDic[errorCode]]; | |
| 110 | + NSError *err = nil; | |
| 111 | + id data = nil; | |
| 112 | + | |
| 113 | + if ([resultCode isEqualToString:@"0"]) { | |
| 114 | + data = responseObjectDic[requestData]; | |
| 115 | + NSMutableArray <CNLiveSubsModel *>*arr = [CNLiveSubsModel mj_objectArrayWithKeyValuesArray:data]; | |
| 116 | + self.subsArr = arr; | |
| 117 | + [self.tableView reloadData]; | |
| 118 | + if (arr.count > 0) { | |
| 119 | + RLMRealm *realm = [self getRealm]; | |
| 120 | + if (realm) { | |
| 121 | + for (CNLiveSubsModel *model in arr) { | |
| 122 | + CNLiveSubsModel *mdl = [CNLiveSubsModel objectInRealm:realm forPrimaryKey:model.homeId]; | |
| 123 | + if (mdl.homeId.length > 0) { | |
| 124 | + //本地有值,不存数据库 | |
| 125 | + // NSLog(@"%@",mdl.homeId); | |
| 126 | + }else { | |
| 127 | + [realm transactionWithBlock:^{ | |
| 128 | + [CNLiveSubsModel createInRealm:realm withValue:model]; | |
| 129 | + }]; | |
| 130 | + } | |
| 131 | + } | |
| 132 | + } | |
| 133 | + UIView *view = [[UIView alloc]init]; | |
| 134 | + if (self.subsArr.count > 0 && self.type == SubsTypeDaren) { | |
| 135 | + view.frame = CGRectFlatMake(0, 0, KScreenWidth, 25); | |
| 136 | + weakSelf.numDarenLbl = [[UILabel alloc] initWithFrame:CGRectFlatMake(0, 0, view.width, view.height)]; | |
| 137 | + weakSelf.numDarenLbl.text = [NSString stringWithFormat:@"%ld位达人",self.subsArr.count ? self.subsArr.count : 0]; | |
| 138 | + weakSelf.numDarenLbl.textColor = UIColorMake(101, 101, 101); | |
| 139 | + weakSelf.numDarenLbl.font = [UIFont systemFontOfSize:14.0f]; //应该是UIFontCNMake(14),等看一下这个怎么传过来 | |
| 140 | + weakSelf.numDarenLbl.textAlignment = NSTextAlignmentCenter; | |
| 141 | + [view addSubview:weakSelf.numDarenLbl]; | |
| 142 | + } | |
| 143 | + self.tableView.tableFooterView = view; | |
| 144 | + }else { | |
| 145 | + //显示empty | |
| 146 | + [self showEmptyViewWithImage:[UIImage imageNamed:@"zhuangtai_kong"] text:@"您现在没有相关内容哦" detailText:@"" buttonTitle:nil buttonAction:@selector(loadData)]; | |
| 147 | + [self setCNNoDataEmptyView]; | |
| 148 | + self.tableView.tableFooterView = nil; | |
| 149 | + } | |
| 150 | + | |
| 151 | + }else { | |
| 152 | + @try { | |
| 153 | + err = [[NSError alloc] initWithDomain:responseObjectDic[errorMessage] code:[resultCode integerValue] userInfo:nil]; | |
| 154 | + } @catch (NSException *exception) { | |
| 155 | + err = [[NSError alloc] initWithDomain:@"接口异常" code:500 userInfo:nil]; | |
| 156 | + } | |
| 157 | + } | |
| 158 | + | |
| 159 | + }]; | |
| 160 | +} | |
| 161 | +- (RLMRealm *)getRealm { | |
| 162 | + RLMRealmConfiguration *config = [[RLMRealmConfiguration alloc] init]; | |
| 163 | + //配置数据迁移的时候,如果有错误导致崩溃问题,会删除数据库重建,不会崩溃,但是数据会丢失。配置NO数据不会丢失,但是应用会崩溃 | |
| 164 | + config.deleteRealmIfMigrationNeeded = YES; | |
| 165 | + | |
| 166 | + NSString *subName = @""; | |
| 167 | + if (_type == SubsTypeDaren) | |
| 168 | + { | |
| 169 | + subName = DarenSubsRealm; | |
| 170 | + }else if (_type == SubsTypeLife) | |
| 171 | + { | |
| 172 | + subName = LifeSubsRealm; | |
| 173 | + } | |
| 174 | + NSString *configPath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]stringByAppendingString:[NSString stringWithFormat:@"/%@.realm",subName]]; | |
| 175 | + config.fileURL = [NSURL URLWithString:configPath]; | |
| 176 | + | |
| 177 | + NSError *error; | |
| 178 | + RLMRealm *realm = [RLMRealm realmWithConfiguration:config error:&error]; | |
| 179 | + if (error) { | |
| 180 | + return nil; | |
| 181 | + } | |
| 182 | + return realm; | |
| 183 | +} | |
| 184 | + | |
| 185 | +- (void)setCNAPIErrorEmptyView | |
| 186 | +{ | |
| 187 | + self.emptyView.actionButton.backgroundColor = UIColorMake(0, 194, 0); | |
| 188 | + self.emptyView.actionButton.layer.masksToBounds = YES; | |
| 189 | + self.emptyView.actionButton.layer.cornerRadius = 6; | |
| 190 | + self.emptyView.imageViewInsets = UIEdgeInsetsMake(0, 0, 15, 0); | |
| 191 | + self.emptyView.textLabelInsets = UIEdgeInsetsMake(0, 0, 14, 0); | |
| 192 | + self.emptyView.detailTextLabelInsets = UIEdgeInsetsMake(0, 0, 16, 0); | |
| 193 | + [self.emptyView setTextLabelFont:UIFontMake(17)]; | |
| 194 | + [self.emptyView setDetailTextLabelFont:UIFontMake(13)]; | |
| 195 | + [self.emptyView setTextLabelTextColor:UIColorMake(102, 102, 102)]; | |
| 196 | + [self.emptyView setDetailTextLabelTextColor:UIColorMake(153, 153, 153)]; | |
| 197 | +} | |
| 198 | +- (void)setCNNoDataEmptyView | |
| 199 | +{ | |
| 200 | + [self.emptyView setTextLabelFont:UIFontMake(17)]; | |
| 201 | + [self.emptyView setTextLabelTextColor:UIColorMake(102, 102, 102)]; | |
| 202 | + self.emptyView.imageViewInsets = UIEdgeInsetsMake(0, 0, 36, 0); | |
| 203 | + | |
| 204 | +} | |
| 205 | + | |
| 206 | +#pragma mark -<UITableViewDataSource,UITableViewDelegate> | |
| 207 | +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { | |
| 208 | + if (tableView == self.tableView) { | |
| 209 | + return 69;//正常要乘以比例系数 | |
| 210 | + }else { | |
| 211 | + return 54; | |
| 212 | + } | |
| 213 | +} | |
| 214 | +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { | |
| 215 | + if (tableView == self.tableView) { | |
| 216 | + NSInteger convCount = [self.subsArr count]; | |
| 217 | + return convCount; | |
| 218 | + } | |
| 219 | + return self.searchResultsKeywords.count; | |
| 220 | +} | |
| 221 | +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { | |
| 222 | + if (tableView == self.tableView) { | |
| 223 | + | |
| 224 | + NSString *reuseIdentifier = @"CNSubscribeCell"; | |
| 225 | + CNLiveSubscribeCell *cell = [tableView dequeueReusableCellWithIdentifier:reuseIdentifier]; | |
| 226 | + if (!cell) { | |
| 227 | + cell = [[CNLiveSubscribeCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier]; | |
| 228 | + } | |
| 229 | + CNLiveSubsModel *model = [self.subsArr objectAtIndex:indexPath.row]; | |
| 230 | + [cell configCellWith:model type:_type]; | |
| 231 | + return cell; | |
| 232 | + | |
| 233 | + } else { | |
| 234 | + static NSString *identifier = @"cell"; | |
| 235 | + QMUITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier]; | |
| 236 | + if (!cell) { | |
| 237 | + cell = [[QMUITableViewCell alloc] initForTableView:self.tableView withReuseIdentifier:identifier]; | |
| 238 | + } | |
| 239 | + | |
| 240 | + NSString *keyword = self.searchResultsKeywords[indexPath.row]; | |
| 241 | + NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:keyword attributes:@{NSForegroundColorAttributeName: [UIColor blackColor]}]; | |
| 242 | + NSRange range = [keyword rangeOfString:self.mySearchController.searchBar.text]; | |
| 243 | + if (range.location != NSNotFound) { | |
| 244 | +// [attributedString addAttributes:@{NSForegroundColorAttributeName: [CNThemeManager sharedInstance].currentTheme.themeTintColor} range:range]; //这个是设置主题的,不知道怎么在这个工程里引入 | |
| 245 | + } | |
| 246 | + cell.textLabel.attributedText = attributedString; | |
| 247 | + [cell updateCellAppearanceWithIndexPath:indexPath]; | |
| 248 | + return cell; | |
| 249 | + } | |
| 250 | +} | |
| 251 | +- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { | |
| 252 | + if (tableView == self.tableView && _type == SubsTypeDaren) { | |
| 253 | + return YES; | |
| 254 | + } | |
| 255 | + else{ | |
| 256 | + return NO; | |
| 257 | + } | |
| 258 | +} | |
| 259 | +//- (NSArray<UITableViewRowAction *> *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath { | |
| 260 | +// if (tableView == self.tableView && _type == SubsTypeDaren) { | |
| 261 | +// MJWeakSelf; | |
| 262 | +// | |
| 263 | +// } | |
| 264 | +//} | |
| 265 | +@end | ... | ... |
CNLiveSubsList/Classes/Model/CNLiveSubsModel.h
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveSubsModel.h | |
| 3 | +// Pods-CNLiveSubsList_Example | |
| 4 | +// | |
| 5 | +// Created by 殷巧娟 on 2019/2/15. | |
| 6 | +// | |
| 7 | + | |
| 8 | +#import <Realm/Realm.h> | |
| 9 | + | |
| 10 | +NS_ASSUME_NONNULL_BEGIN | |
| 11 | + | |
| 12 | +@interface CNLiveSubsModel : RLMObject | |
| 13 | +@property (nonatomic ,copy) NSString *homeId;//达人Id | |
| 14 | +@property (nonatomic ,copy) NSString *nickName;//达人昵称 | |
| 15 | +@property (nonatomic ,copy) NSString *image;//达人头像地址 | |
| 16 | +@property (nonatomic ,copy) NSString *desc;//内容 | |
| 17 | +@property (nonatomic ,assign) long long ts;//时间戳 | |
| 18 | +@end | |
| 19 | + | |
| 20 | +NS_ASSUME_NONNULL_END | ... | ... |
CNLiveSubsList/Classes/Model/CNLiveSubsModel.m
0 → 100644
CNLiveSubsList/Classes/View/CNLiveSubscribeCell.h
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveSubscribeCell.h | |
| 3 | +// Pods-CNLiveSubsList_Example | |
| 4 | +// | |
| 5 | +// Created by 殷巧娟 on 2019/2/15. | |
| 6 | +// | |
| 7 | + | |
| 8 | +#import <QMUIKit/QMUIKit.h> | |
| 9 | + | |
| 10 | +NS_ASSUME_NONNULL_BEGIN | |
| 11 | + | |
| 12 | +typedef NS_ENUM(NSInteger, SubsType) { | |
| 13 | + SubsTypeDaren = 0,//达人号 | |
| 14 | + SubsTypeLife //生活号 | |
| 15 | +}; | |
| 16 | + | |
| 17 | +@class CNLiveSubsModel; | |
| 18 | +@interface CNLiveSubscribeCell : QMUITableViewCell | |
| 19 | +- (void)configCellWith:(CNLiveSubsModel *)model type:(SubsType)type; | |
| 20 | +@end | |
| 21 | + | |
| 22 | +NS_ASSUME_NONNULL_END | ... | ... |
CNLiveSubsList/Classes/View/CNLiveSubscribeCell.m
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveSubscribeCell.m | |
| 3 | +// Pods-CNLiveSubsList_Example | |
| 4 | +// | |
| 5 | +// Created by 殷巧娟 on 2019/2/15. | |
| 6 | +// | |
| 7 | + | |
| 8 | +#import "CNLiveSubscribeCell.h" | |
| 9 | +#import "CNLiveSubsModel.h" | |
| 10 | +#import "SDWebImageManager.h" | |
| 11 | +#import "UIImageView+WebCache.h" | |
| 12 | +#import <CNLiveCommonCategory/CNLiveCommonCategory.h> | |
| 13 | +#import <CNLiveCommonCategory/UIColor+CNLiveExtension.h> | |
| 14 | +#import <QMUIKit/QMUIKit.h> | |
| 15 | +#import <Masonry/Masonry.h> | |
| 16 | +#import <Realm/Realm.h> | |
| 17 | +#define kClearColor [UIColor clearColor] | |
| 18 | +#define kDefaultUserIcon [UIImage imageNamed:@"touxiang2"] | |
| 19 | +#define ZXMargin 10 | |
| 20 | +//达人列表表名 | |
| 21 | +static NSString *const DarenSubsRealm = @"DarenSubs"; | |
| 22 | +//生活列表表名 | |
| 23 | +static NSString *const LifeSubsRealm = @"LifeSubs"; | |
| 24 | +@interface CNLiveSubscribeCell () | |
| 25 | +{ | |
| 26 | + SubsType _type; | |
| 27 | +} | |
| 28 | +@property (nonatomic ,strong) CNLiveSubsModel * model; | |
| 29 | +@property (nonatomic ,strong) UIImageView * icon;//头像 | |
| 30 | +@property (nonatomic ,strong) UIView * badgeView;//是否已读 | |
| 31 | +@property (nonatomic ,strong) UILabel * titleLbl;//名称 | |
| 32 | +@property (nonatomic ,strong) UILabel * descLbl;//内容 | |
| 33 | +@property (nonatomic ,strong) UILabel * timeLbl;//内容 | |
| 34 | +@end | |
| 35 | + | |
| 36 | +@implementation CNLiveSubscribeCell | |
| 37 | + | |
| 38 | +- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { | |
| 39 | + if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { | |
| 40 | +// [self initSubViews]; | |
| 41 | + self.backgroundColor = kClearColor; | |
| 42 | + self.selectionStyle = UITableViewCellSelectionStyleGray; | |
| 43 | + } | |
| 44 | + return self; | |
| 45 | +} | |
| 46 | +- (void)configCellWith:(CNLiveSubsModel *)model type:(SubsType)type { | |
| 47 | + _model = model; | |
| 48 | + _type = type; | |
| 49 | + [_icon sd_setImageWithURL:[NSURL URLWithString:model.image] placeholderImage:type == SubsTypeLife ? [UIImage imageNamed:@"sh_dingdan"] : kDefaultUserIcon]; | |
| 50 | + _titleLbl.text = model.nickName; | |
| 51 | + _descLbl.text = [model.desc qmui_trimAllWhiteSpace]; | |
| 52 | + NSString *str = [NSString stringWithFormat:@"%lld",(long long)model.ts];//服务器返回时间戳 | |
| 53 | + NSTimeInterval time = ceil([str doubleValue] / 1000); | |
| 54 | + NSDate *detaildate = [NSDate dateWithTimeIntervalSince1970:time]; | |
| 55 | + _timeLbl.text = [detaildate shortTimeTextOfDate]; | |
| 56 | + | |
| 57 | +} | |
| 58 | + | |
| 59 | +- (void)initSubViews | |
| 60 | +{ | |
| 61 | + _icon = [[UIImageView alloc] init]; | |
| 62 | + _icon.layer.cornerRadius = 3.0; | |
| 63 | + _icon.layer.masksToBounds = YES; | |
| 64 | + [self.contentView addSubview:_icon]; | |
| 65 | + | |
| 66 | + _badgeView = [[UIView alloc] init]; | |
| 67 | + _badgeView.backgroundColor = [UIColor redColor]; | |
| 68 | + _badgeView.layer.cornerRadius = 5; | |
| 69 | + _badgeView.layer.masksToBounds = YES; | |
| 70 | + [self.contentView addSubview:_badgeView]; | |
| 71 | + | |
| 72 | + _titleLbl = [[UILabel alloc] init]; | |
| 73 | + _titleLbl.font = [UIFont systemFontOfSize:17.0f]; | |
| 74 | + _titleLbl.textColor = UIColorMake(40, 40, 40); | |
| 75 | + [self.contentView addSubview:_titleLbl]; | |
| 76 | + | |
| 77 | + _timeLbl = [[UILabel alloc] init]; | |
| 78 | + _timeLbl.font = [UIFont systemFontOfSize:12.5f]; | |
| 79 | + _timeLbl.textAlignment = NSTextAlignmentRight; | |
| 80 | + _timeLbl.textColor = UIColorMake(137, 137, 137); | |
| 81 | + _timeLbl.adjustsFontSizeToFitWidth = YES; | |
| 82 | + [self.contentView addSubview:_timeLbl]; | |
| 83 | + | |
| 84 | + _descLbl = [[UILabel alloc] init]; | |
| 85 | + _descLbl.font = [UIFont systemFontOfSize:14.0f]; | |
| 86 | + _descLbl.textColor = UIColorMake(101, 101, 101); | |
| 87 | + [self.contentView addSubview:_descLbl]; | |
| 88 | +} | |
| 89 | +- (void)layoutSubviews | |
| 90 | +{ | |
| 91 | + [super layoutSubviews]; | |
| 92 | + [self relayoutFrameOfSubViews]; | |
| 93 | +} | |
| 94 | +- (void)relayoutFrameOfSubViews | |
| 95 | +{ | |
| 96 | + //头像 | |
| 97 | + [_icon mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 98 | + make.left.mas_equalTo(ZXMargin); | |
| 99 | + make.top.mas_equalTo(10); | |
| 100 | + make.bottom.mas_equalTo(-10); | |
| 101 | + }]; | |
| 102 | + [_icon mas_updateConstraints:^(MASConstraintMaker *make) { | |
| 103 | + make.width.mas_equalTo(self->_icon.mas_height); | |
| 104 | + }]; | |
| 105 | + | |
| 106 | + //时间 | |
| 107 | + [_timeLbl mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 108 | + make.top.mas_equalTo(self->_icon).mas_offset(5); | |
| 109 | + make.right.mas_equalTo(self.contentView).mas_offset(-14); | |
| 110 | + }]; | |
| 111 | + [_timeLbl setContentCompressionResistancePriority:300 forAxis:UILayoutConstraintAxisHorizontal];//大于_conversationName优先级即可,使时间lbl优先显示 | |
| 112 | + | |
| 113 | + //会话名称 | |
| 114 | + [_titleLbl mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 115 | + make.left.mas_equalTo(self->_icon.mas_right).offset(10); | |
| 116 | + make.top.mas_equalTo(self->_icon).mas_offset(2); | |
| 117 | + make.right.mas_lessThanOrEqualTo(self->_timeLbl.mas_left).mas_offset(-5); | |
| 118 | + }]; | |
| 119 | + [_titleLbl setContentCompressionResistancePriority:100 forAxis:UILayoutConstraintAxisHorizontal]; | |
| 120 | + | |
| 121 | + //正文 | |
| 122 | + [_descLbl mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 123 | + make.top.mas_equalTo(self->_titleLbl.mas_bottom).mas_offset(6); | |
| 124 | + make.left.mas_equalTo(self->_titleLbl); | |
| 125 | + make.right.mas_equalTo(self.contentView).offset(-15);//以后改为消息免打扰 | |
| 126 | + }]; | |
| 127 | + [self layoutIfNeeded]; | |
| 128 | + | |
| 129 | + //大号未读标识 | |
| 130 | + [_badgeView mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 131 | + make.centerX.mas_equalTo(self->_icon.mas_right).mas_offset(-1.5); | |
| 132 | + make.centerY.mas_equalTo(self->_icon.mas_top).mas_offset(1.5); | |
| 133 | + }]; | |
| 134 | + | |
| 135 | + if (_model.homeId.length > 0) { | |
| 136 | + RLMRealm *realm = [self getRealm]; | |
| 137 | + | |
| 138 | + if (realm) { | |
| 139 | + RLMResults <CNLiveSubsModel *>*subModels = [CNLiveSubsModel objectsInRealm:realm where:[NSString stringWithFormat:@"homeId = '%@'",_model.homeId]];//'home:daren:daren1' 'home:life:life1' | |
| 140 | + long long localTS = 0;//本地这个达人进入主页的时间戳 | |
| 141 | + if (subModels.count > 0) { | |
| 142 | + | |
| 143 | + CNLiveSubsModel *mdl = [subModels firstObject]; | |
| 144 | + localTS = mdl.ts; | |
| 145 | + } | |
| 146 | + NSString *str = [NSString stringWithFormat:@"%lld",(long long)_model.ts];//服务器返回时间戳 | |
| 147 | + NSTimeInterval time = ceil([str doubleValue]); | |
| 148 | + // NSLog(@"\nloca:%zd,mdlTs:%zd",localTS,_model.ts); | |
| 149 | + if (time <= localTS) { | |
| 150 | + //设置已读 | |
| 151 | + [_badgeView mas_updateConstraints:^(MASConstraintMaker *make) { | |
| 152 | + make.size.mas_equalTo(CGSizeZero); | |
| 153 | + }]; | |
| 154 | + }else | |
| 155 | + {//设置未读 | |
| 156 | + [_badgeView mas_updateConstraints:^(MASConstraintMaker *make) { | |
| 157 | + make.size.mas_equalTo(CGSizeMake(10, 10)); | |
| 158 | + }]; | |
| 159 | + } | |
| 160 | + }else | |
| 161 | + { | |
| 162 | + //设置未读 | |
| 163 | + [_badgeView mas_updateConstraints:^(MASConstraintMaker *make) { | |
| 164 | + make.size.mas_equalTo(CGSizeMake(10, 10)); | |
| 165 | + }]; | |
| 166 | + } | |
| 167 | + } | |
| 168 | +} | |
| 169 | + | |
| 170 | +- (RLMRealm *)getRealm { | |
| 171 | + | |
| 172 | + RLMRealmConfiguration *config = [[RLMRealmConfiguration alloc] init];//defaultConfiguration]; | |
| 173 | + NSString *subName = @""; | |
| 174 | + if (_type == SubsTypeDaren) | |
| 175 | + { | |
| 176 | + subName = DarenSubsRealm; | |
| 177 | + }else if (_type == SubsTypeLife) | |
| 178 | + { | |
| 179 | + subName = LifeSubsRealm; | |
| 180 | + } | |
| 181 | + | |
| 182 | + NSString *configPath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]stringByAppendingString:[NSString stringWithFormat:@"/%@.realm",subName]]; | |
| 183 | + config.fileURL = [NSURL URLWithString:configPath]; | |
| 184 | + // config.fileURL = [[[config.fileURL URLByDeletingLastPathComponent] URLByAppendingPathComponent:subName] URLByAppendingPathExtension:@"realm"]; | |
| 185 | + NSError *error; | |
| 186 | + RLMRealm *realm = [RLMRealm realmWithConfiguration:config error:&error]; | |
| 187 | + | |
| 188 | + if (error) { | |
| 189 | + return nil; | |
| 190 | + } | |
| 191 | + return realm; | |
| 192 | +} | |
| 193 | + | |
| 194 | +//cell上下分割线 | |
| 195 | +- (void)drawRect:(CGRect)rect | |
| 196 | +{ | |
| 197 | + CGContextRef context = UIGraphicsGetCurrentContext(); | |
| 198 | + | |
| 199 | + CGContextSetFillColorWithColor(context, [UIColor clearColor].CGColor); | |
| 200 | + CGContextFillRect(context, rect); | |
| 201 | + | |
| 202 | + //下分割线 | |
| 203 | +// CGContextSetStrokeColorWithColor(context, CNLiveColorWithHexString(@"e3e1e1").CGColor); | |
| 204 | + CGContextSetStrokeColorWithColor(context, [UIColor colorWithHexString:@"e3e1e1"].CGColor); | |
| 205 | + CGContextStrokeRect(context, CGRectMake(10, rect.size.height, rect.size.width - 20, 1)); | |
| 206 | +} | |
| 207 | + | |
| 208 | +@end | ... | ... |
Example/CNLiveSubsList.xcodeproj/project.pbxproj
0 → 100644
| 1 | +// !$*UTF8*$! | |
| 2 | +{ | |
| 3 | + archiveVersion = 1; | |
| 4 | + classes = { | |
| 5 | + }; | |
| 6 | + objectVersion = 46; | |
| 7 | + objects = { | |
| 8 | + | |
| 9 | +/* Begin PBXBuildFile section */ | |
| 10 | + 5F4F0B44817AFC6C19492960 /* Pods_CNLiveSubsList_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F15B224667669C2663909DEF /* Pods_CNLiveSubsList_Tests.framework */; }; | |
| 11 | + 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; | |
| 12 | + 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; }; | |
| 13 | + 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; | |
| 14 | + 6003F598195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F596195388D20070C39A /* InfoPlist.strings */; }; | |
| 15 | + 6003F59A195388D20070C39A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F599195388D20070C39A /* main.m */; }; | |
| 16 | + 6003F59E195388D20070C39A /* CNLiveAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F59D195388D20070C39A /* CNLiveAppDelegate.m */; }; | |
| 17 | + 6003F5A7195388D20070C39A /* CNLiveViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5A6195388D20070C39A /* CNLiveViewController.m */; }; | |
| 18 | + 6003F5A9195388D20070C39A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5A8195388D20070C39A /* Images.xcassets */; }; | |
| 19 | + 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F5AF195388D20070C39A /* XCTest.framework */; }; | |
| 20 | + 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; | |
| 21 | + 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; | |
| 22 | + 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; }; | |
| 23 | + 6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; }; | |
| 24 | + 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */; }; | |
| 25 | + 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; }; | |
| 26 | + F9B261FC0FFBD09181BD4E92 /* Pods_CNLiveSubsList_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DD18734991CD92515E50736 /* Pods_CNLiveSubsList_Example.framework */; }; | |
| 27 | +/* End PBXBuildFile section */ | |
| 28 | + | |
| 29 | +/* Begin PBXContainerItemProxy section */ | |
| 30 | + 6003F5B3195388D20070C39A /* PBXContainerItemProxy */ = { | |
| 31 | + isa = PBXContainerItemProxy; | |
| 32 | + containerPortal = 6003F582195388D10070C39A /* Project object */; | |
| 33 | + proxyType = 1; | |
| 34 | + remoteGlobalIDString = 6003F589195388D20070C39A; | |
| 35 | + remoteInfo = CNLiveSubsList; | |
| 36 | + }; | |
| 37 | +/* End PBXContainerItemProxy section */ | |
| 38 | + | |
| 39 | +/* Begin PBXFileReference section */ | |
| 40 | + 2188AE59006549D58E227B0F /* CNLiveSubsList.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = CNLiveSubsList.podspec; path = ../CNLiveSubsList.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; | |
| 41 | + 3E2A2BD79227FFA7EB45536D /* Pods-CNLiveSubsList_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveSubsList_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-CNLiveSubsList_Tests/Pods-CNLiveSubsList_Tests.release.xcconfig"; sourceTree = "<group>"; }; | |
| 42 | + 4EB0F9432216ABA70078855E /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; | |
| 43 | + 4EB0F9452216ABB20078855E /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; }; | |
| 44 | + 6003F58A195388D20070C39A /* CNLiveSubsList_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CNLiveSubsList_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; | |
| 45 | + 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; | |
| 46 | + 6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; | |
| 47 | + 6003F591195388D20070C39A /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; | |
| 48 | + 6003F595195388D20070C39A /* CNLiveSubsList-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "CNLiveSubsList-Info.plist"; sourceTree = "<group>"; }; | |
| 49 | + 6003F597195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; }; | |
| 50 | + 6003F599195388D20070C39A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; | |
| 51 | + 6003F59B195388D20070C39A /* CNLiveSubsList-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CNLiveSubsList-Prefix.pch"; sourceTree = "<group>"; }; | |
| 52 | + 6003F59C195388D20070C39A /* CNLiveAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CNLiveAppDelegate.h; sourceTree = "<group>"; }; | |
| 53 | + 6003F59D195388D20070C39A /* CNLiveAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CNLiveAppDelegate.m; sourceTree = "<group>"; }; | |
| 54 | + 6003F5A5195388D20070C39A /* CNLiveViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CNLiveViewController.h; sourceTree = "<group>"; }; | |
| 55 | + 6003F5A6195388D20070C39A /* CNLiveViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CNLiveViewController.m; sourceTree = "<group>"; }; | |
| 56 | + 6003F5A8195388D20070C39A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; }; | |
| 57 | + 6003F5AE195388D20070C39A /* CNLiveSubsList_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CNLiveSubsList_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; | |
| 58 | + 6003F5AF195388D20070C39A /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; | |
| 59 | + 6003F5B7195388D20070C39A /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = "<group>"; }; | |
| 60 | + 6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; }; | |
| 61 | + 6003F5BB195388D20070C39A /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = "<group>"; }; | |
| 62 | + 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = "<group>"; }; | |
| 63 | + 6DD18734991CD92515E50736 /* Pods_CNLiveSubsList_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CNLiveSubsList_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; | |
| 64 | + 71719F9E1E33DC2100824A3D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; | |
| 65 | + 82061A3F2A0FEAC3B64A32E1 /* Pods-CNLiveSubsList_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveSubsList_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-CNLiveSubsList_Tests/Pods-CNLiveSubsList_Tests.debug.xcconfig"; sourceTree = "<group>"; }; | |
| 66 | + 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; }; | |
| 67 | + 898896A193095E14046F578C /* Pods-CNLiveSubsList_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveSubsList_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-CNLiveSubsList_Example/Pods-CNLiveSubsList_Example.debug.xcconfig"; sourceTree = "<group>"; }; | |
| 68 | + 8F8841DAFAD1E34E348E6E37 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; }; | |
| 69 | + F15B224667669C2663909DEF /* Pods_CNLiveSubsList_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CNLiveSubsList_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; | |
| 70 | + F43B7EAA05E04B92E9239F12 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; }; | |
| 71 | + F5730D3271C7691032879E96 /* Pods-CNLiveSubsList_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveSubsList_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-CNLiveSubsList_Example/Pods-CNLiveSubsList_Example.release.xcconfig"; sourceTree = "<group>"; }; | |
| 72 | +/* End PBXFileReference section */ | |
| 73 | + | |
| 74 | +/* Begin PBXFrameworksBuildPhase section */ | |
| 75 | + 6003F587195388D20070C39A /* Frameworks */ = { | |
| 76 | + isa = PBXFrameworksBuildPhase; | |
| 77 | + buildActionMask = 2147483647; | |
| 78 | + files = ( | |
| 79 | + 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */, | |
| 80 | + 6003F592195388D20070C39A /* UIKit.framework in Frameworks */, | |
| 81 | + 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */, | |
| 82 | + F9B261FC0FFBD09181BD4E92 /* Pods_CNLiveSubsList_Example.framework in Frameworks */, | |
| 83 | + ); | |
| 84 | + runOnlyForDeploymentPostprocessing = 0; | |
| 85 | + }; | |
| 86 | + 6003F5AB195388D20070C39A /* Frameworks */ = { | |
| 87 | + isa = PBXFrameworksBuildPhase; | |
| 88 | + buildActionMask = 2147483647; | |
| 89 | + files = ( | |
| 90 | + 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */, | |
| 91 | + 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */, | |
| 92 | + 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */, | |
| 93 | + 5F4F0B44817AFC6C19492960 /* Pods_CNLiveSubsList_Tests.framework in Frameworks */, | |
| 94 | + ); | |
| 95 | + runOnlyForDeploymentPostprocessing = 0; | |
| 96 | + }; | |
| 97 | +/* End PBXFrameworksBuildPhase section */ | |
| 98 | + | |
| 99 | +/* Begin PBXGroup section */ | |
| 100 | + 6003F581195388D10070C39A = { | |
| 101 | + isa = PBXGroup; | |
| 102 | + children = ( | |
| 103 | + 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */, | |
| 104 | + 6003F593195388D20070C39A /* Example for CNLiveSubsList */, | |
| 105 | + 6003F5B5195388D20070C39A /* Tests */, | |
| 106 | + 6003F58C195388D20070C39A /* Frameworks */, | |
| 107 | + 6003F58B195388D20070C39A /* Products */, | |
| 108 | + B6AEC0E01907951F4DA02C8D /* Pods */, | |
| 109 | + ); | |
| 110 | + sourceTree = "<group>"; | |
| 111 | + }; | |
| 112 | + 6003F58B195388D20070C39A /* Products */ = { | |
| 113 | + isa = PBXGroup; | |
| 114 | + children = ( | |
| 115 | + 6003F58A195388D20070C39A /* CNLiveSubsList_Example.app */, | |
| 116 | + 6003F5AE195388D20070C39A /* CNLiveSubsList_Tests.xctest */, | |
| 117 | + ); | |
| 118 | + name = Products; | |
| 119 | + sourceTree = "<group>"; | |
| 120 | + }; | |
| 121 | + 6003F58C195388D20070C39A /* Frameworks */ = { | |
| 122 | + isa = PBXGroup; | |
| 123 | + children = ( | |
| 124 | + 4EB0F9452216ABB20078855E /* libc++.tbd */, | |
| 125 | + 4EB0F9432216ABA70078855E /* libz.tbd */, | |
| 126 | + 6003F58D195388D20070C39A /* Foundation.framework */, | |
| 127 | + 6003F58F195388D20070C39A /* CoreGraphics.framework */, | |
| 128 | + 6003F591195388D20070C39A /* UIKit.framework */, | |
| 129 | + 6003F5AF195388D20070C39A /* XCTest.framework */, | |
| 130 | + 6DD18734991CD92515E50736 /* Pods_CNLiveSubsList_Example.framework */, | |
| 131 | + F15B224667669C2663909DEF /* Pods_CNLiveSubsList_Tests.framework */, | |
| 132 | + ); | |
| 133 | + name = Frameworks; | |
| 134 | + sourceTree = "<group>"; | |
| 135 | + }; | |
| 136 | + 6003F593195388D20070C39A /* Example for CNLiveSubsList */ = { | |
| 137 | + isa = PBXGroup; | |
| 138 | + children = ( | |
| 139 | + 6003F59C195388D20070C39A /* CNLiveAppDelegate.h */, | |
| 140 | + 6003F59D195388D20070C39A /* CNLiveAppDelegate.m */, | |
| 141 | + 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */, | |
| 142 | + 6003F5A5195388D20070C39A /* CNLiveViewController.h */, | |
| 143 | + 6003F5A6195388D20070C39A /* CNLiveViewController.m */, | |
| 144 | + 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */, | |
| 145 | + 6003F5A8195388D20070C39A /* Images.xcassets */, | |
| 146 | + 6003F594195388D20070C39A /* Supporting Files */, | |
| 147 | + ); | |
| 148 | + name = "Example for CNLiveSubsList"; | |
| 149 | + path = CNLiveSubsList; | |
| 150 | + sourceTree = "<group>"; | |
| 151 | + }; | |
| 152 | + 6003F594195388D20070C39A /* Supporting Files */ = { | |
| 153 | + isa = PBXGroup; | |
| 154 | + children = ( | |
| 155 | + 6003F595195388D20070C39A /* CNLiveSubsList-Info.plist */, | |
| 156 | + 6003F596195388D20070C39A /* InfoPlist.strings */, | |
| 157 | + 6003F599195388D20070C39A /* main.m */, | |
| 158 | + 6003F59B195388D20070C39A /* CNLiveSubsList-Prefix.pch */, | |
| 159 | + ); | |
| 160 | + name = "Supporting Files"; | |
| 161 | + sourceTree = "<group>"; | |
| 162 | + }; | |
| 163 | + 6003F5B5195388D20070C39A /* Tests */ = { | |
| 164 | + isa = PBXGroup; | |
| 165 | + children = ( | |
| 166 | + 6003F5BB195388D20070C39A /* Tests.m */, | |
| 167 | + 6003F5B6195388D20070C39A /* Supporting Files */, | |
| 168 | + ); | |
| 169 | + path = Tests; | |
| 170 | + sourceTree = "<group>"; | |
| 171 | + }; | |
| 172 | + 6003F5B6195388D20070C39A /* Supporting Files */ = { | |
| 173 | + isa = PBXGroup; | |
| 174 | + children = ( | |
| 175 | + 6003F5B7195388D20070C39A /* Tests-Info.plist */, | |
| 176 | + 6003F5B8195388D20070C39A /* InfoPlist.strings */, | |
| 177 | + 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */, | |
| 178 | + ); | |
| 179 | + name = "Supporting Files"; | |
| 180 | + sourceTree = "<group>"; | |
| 181 | + }; | |
| 182 | + 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */ = { | |
| 183 | + isa = PBXGroup; | |
| 184 | + children = ( | |
| 185 | + 2188AE59006549D58E227B0F /* CNLiveSubsList.podspec */, | |
| 186 | + F43B7EAA05E04B92E9239F12 /* README.md */, | |
| 187 | + 8F8841DAFAD1E34E348E6E37 /* LICENSE */, | |
| 188 | + ); | |
| 189 | + name = "Podspec Metadata"; | |
| 190 | + sourceTree = "<group>"; | |
| 191 | + }; | |
| 192 | + B6AEC0E01907951F4DA02C8D /* Pods */ = { | |
| 193 | + isa = PBXGroup; | |
| 194 | + children = ( | |
| 195 | + 898896A193095E14046F578C /* Pods-CNLiveSubsList_Example.debug.xcconfig */, | |
| 196 | + F5730D3271C7691032879E96 /* Pods-CNLiveSubsList_Example.release.xcconfig */, | |
| 197 | + 82061A3F2A0FEAC3B64A32E1 /* Pods-CNLiveSubsList_Tests.debug.xcconfig */, | |
| 198 | + 3E2A2BD79227FFA7EB45536D /* Pods-CNLiveSubsList_Tests.release.xcconfig */, | |
| 199 | + ); | |
| 200 | + name = Pods; | |
| 201 | + sourceTree = "<group>"; | |
| 202 | + }; | |
| 203 | +/* End PBXGroup section */ | |
| 204 | + | |
| 205 | +/* Begin PBXNativeTarget section */ | |
| 206 | + 6003F589195388D20070C39A /* CNLiveSubsList_Example */ = { | |
| 207 | + isa = PBXNativeTarget; | |
| 208 | + buildConfigurationList = 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "CNLiveSubsList_Example" */; | |
| 209 | + buildPhases = ( | |
| 210 | + DD7D5D091744AF0A8F7F7C27 /* [CP] Check Pods Manifest.lock */, | |
| 211 | + 6003F586195388D20070C39A /* Sources */, | |
| 212 | + 6003F587195388D20070C39A /* Frameworks */, | |
| 213 | + 6003F588195388D20070C39A /* Resources */, | |
| 214 | + CAD0FD949B13D44EF48EF48D /* [CP] Embed Pods Frameworks */, | |
| 215 | + ); | |
| 216 | + buildRules = ( | |
| 217 | + ); | |
| 218 | + dependencies = ( | |
| 219 | + ); | |
| 220 | + name = CNLiveSubsList_Example; | |
| 221 | + productName = CNLiveSubsList; | |
| 222 | + productReference = 6003F58A195388D20070C39A /* CNLiveSubsList_Example.app */; | |
| 223 | + productType = "com.apple.product-type.application"; | |
| 224 | + }; | |
| 225 | + 6003F5AD195388D20070C39A /* CNLiveSubsList_Tests */ = { | |
| 226 | + isa = PBXNativeTarget; | |
| 227 | + buildConfigurationList = 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "CNLiveSubsList_Tests" */; | |
| 228 | + buildPhases = ( | |
| 229 | + FEBDC65778D9AC8C4BA489DC /* [CP] Check Pods Manifest.lock */, | |
| 230 | + 6003F5AA195388D20070C39A /* Sources */, | |
| 231 | + 6003F5AB195388D20070C39A /* Frameworks */, | |
| 232 | + 6003F5AC195388D20070C39A /* Resources */, | |
| 233 | + CFDBC8EA53A17455BAE52D6A /* [CP] Embed Pods Frameworks */, | |
| 234 | + ); | |
| 235 | + buildRules = ( | |
| 236 | + ); | |
| 237 | + dependencies = ( | |
| 238 | + 6003F5B4195388D20070C39A /* PBXTargetDependency */, | |
| 239 | + ); | |
| 240 | + name = CNLiveSubsList_Tests; | |
| 241 | + productName = CNLiveSubsListTests; | |
| 242 | + productReference = 6003F5AE195388D20070C39A /* CNLiveSubsList_Tests.xctest */; | |
| 243 | + productType = "com.apple.product-type.bundle.unit-test"; | |
| 244 | + }; | |
| 245 | +/* End PBXNativeTarget section */ | |
| 246 | + | |
| 247 | +/* Begin PBXProject section */ | |
| 248 | + 6003F582195388D10070C39A /* Project object */ = { | |
| 249 | + isa = PBXProject; | |
| 250 | + attributes = { | |
| 251 | + CLASSPREFIX = CNLive; | |
| 252 | + LastUpgradeCheck = 0720; | |
| 253 | + ORGANIZATIONNAME = "殷巧娟"; | |
| 254 | + TargetAttributes = { | |
| 255 | + 6003F589195388D20070C39A = { | |
| 256 | + DevelopmentTeam = 94X49GG3ZW; | |
| 257 | + }; | |
| 258 | + 6003F5AD195388D20070C39A = { | |
| 259 | + TestTargetID = 6003F589195388D20070C39A; | |
| 260 | + }; | |
| 261 | + }; | |
| 262 | + }; | |
| 263 | + buildConfigurationList = 6003F585195388D10070C39A /* Build configuration list for PBXProject "CNLiveSubsList" */; | |
| 264 | + compatibilityVersion = "Xcode 3.2"; | |
| 265 | + developmentRegion = English; | |
| 266 | + hasScannedForEncodings = 0; | |
| 267 | + knownRegions = ( | |
| 268 | + en, | |
| 269 | + Base, | |
| 270 | + ); | |
| 271 | + mainGroup = 6003F581195388D10070C39A; | |
| 272 | + productRefGroup = 6003F58B195388D20070C39A /* Products */; | |
| 273 | + projectDirPath = ""; | |
| 274 | + projectRoot = ""; | |
| 275 | + targets = ( | |
| 276 | + 6003F589195388D20070C39A /* CNLiveSubsList_Example */, | |
| 277 | + 6003F5AD195388D20070C39A /* CNLiveSubsList_Tests */, | |
| 278 | + ); | |
| 279 | + }; | |
| 280 | +/* End PBXProject section */ | |
| 281 | + | |
| 282 | +/* Begin PBXResourcesBuildPhase section */ | |
| 283 | + 6003F588195388D20070C39A /* Resources */ = { | |
| 284 | + isa = PBXResourcesBuildPhase; | |
| 285 | + buildActionMask = 2147483647; | |
| 286 | + files = ( | |
| 287 | + 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */, | |
| 288 | + 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */, | |
| 289 | + 6003F5A9195388D20070C39A /* Images.xcassets in Resources */, | |
| 290 | + 6003F598195388D20070C39A /* InfoPlist.strings in Resources */, | |
| 291 | + ); | |
| 292 | + runOnlyForDeploymentPostprocessing = 0; | |
| 293 | + }; | |
| 294 | + 6003F5AC195388D20070C39A /* Resources */ = { | |
| 295 | + isa = PBXResourcesBuildPhase; | |
| 296 | + buildActionMask = 2147483647; | |
| 297 | + files = ( | |
| 298 | + 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */, | |
| 299 | + ); | |
| 300 | + runOnlyForDeploymentPostprocessing = 0; | |
| 301 | + }; | |
| 302 | +/* End PBXResourcesBuildPhase section */ | |
| 303 | + | |
| 304 | +/* Begin PBXShellScriptBuildPhase section */ | |
| 305 | + CAD0FD949B13D44EF48EF48D /* [CP] Embed Pods Frameworks */ = { | |
| 306 | + isa = PBXShellScriptBuildPhase; | |
| 307 | + buildActionMask = 2147483647; | |
| 308 | + files = ( | |
| 309 | + ); | |
| 310 | + inputFileListPaths = ( | |
| 311 | + ); | |
| 312 | + inputPaths = ( | |
| 313 | + "${SRCROOT}/Pods/Target Support Files/Pods-CNLiveSubsList_Example/Pods-CNLiveSubsList_Example-frameworks.sh", | |
| 314 | + "${BUILT_PRODUCTS_DIR}/AFNetworking/AFNetworking.framework", | |
| 315 | + "${BUILT_PRODUCTS_DIR}/CNLiveBaseKit/CNLiveBaseKit.framework", | |
| 316 | + "${BUILT_PRODUCTS_DIR}/CNLiveCommonCategory/CNLiveCommonCategory.framework", | |
| 317 | + "${BUILT_PRODUCTS_DIR}/CNLiveRequestBastKit/CNLiveRequestBastKit.framework", | |
| 318 | + "${BUILT_PRODUCTS_DIR}/CNLiveSubsList/CNLiveSubsList.framework", | |
| 319 | + "${BUILT_PRODUCTS_DIR}/MJExtension/MJExtension.framework", | |
| 320 | + "${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework", | |
| 321 | + "${BUILT_PRODUCTS_DIR}/QMUIKit/QMUIKit.framework", | |
| 322 | + "${BUILT_PRODUCTS_DIR}/Realm/Realm.framework", | |
| 323 | + "${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework", | |
| 324 | + ); | |
| 325 | + name = "[CP] Embed Pods Frameworks"; | |
| 326 | + outputFileListPaths = ( | |
| 327 | + ); | |
| 328 | + outputPaths = ( | |
| 329 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AFNetworking.framework", | |
| 330 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBaseKit.framework", | |
| 331 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCommonCategory.framework", | |
| 332 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveRequestBastKit.framework", | |
| 333 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveSubsList.framework", | |
| 334 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJExtension.framework", | |
| 335 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Masonry.framework", | |
| 336 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/QMUIKit.framework", | |
| 337 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Realm.framework", | |
| 338 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework", | |
| 339 | + ); | |
| 340 | + runOnlyForDeploymentPostprocessing = 0; | |
| 341 | + shellPath = /bin/sh; | |
| 342 | + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CNLiveSubsList_Example/Pods-CNLiveSubsList_Example-frameworks.sh\"\n"; | |
| 343 | + showEnvVarsInLog = 0; | |
| 344 | + }; | |
| 345 | + CFDBC8EA53A17455BAE52D6A /* [CP] Embed Pods Frameworks */ = { | |
| 346 | + isa = PBXShellScriptBuildPhase; | |
| 347 | + buildActionMask = 2147483647; | |
| 348 | + files = ( | |
| 349 | + ); | |
| 350 | + inputFileListPaths = ( | |
| 351 | + ); | |
| 352 | + inputPaths = ( | |
| 353 | + "${SRCROOT}/Pods/Target Support Files/Pods-CNLiveSubsList_Tests/Pods-CNLiveSubsList_Tests-frameworks.sh", | |
| 354 | + "${BUILT_PRODUCTS_DIR}/AFNetworking/AFNetworking.framework", | |
| 355 | + "${BUILT_PRODUCTS_DIR}/CNLiveBaseKit/CNLiveBaseKit.framework", | |
| 356 | + "${BUILT_PRODUCTS_DIR}/CNLiveCommonCategory/CNLiveCommonCategory.framework", | |
| 357 | + "${BUILT_PRODUCTS_DIR}/CNLiveRequestBastKit/CNLiveRequestBastKit.framework", | |
| 358 | + "${BUILT_PRODUCTS_DIR}/MJExtension/MJExtension.framework", | |
| 359 | + "${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework", | |
| 360 | + "${BUILT_PRODUCTS_DIR}/QMUIKit/QMUIKit.framework", | |
| 361 | + "${BUILT_PRODUCTS_DIR}/Realm/Realm.framework", | |
| 362 | + "${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework", | |
| 363 | + ); | |
| 364 | + name = "[CP] Embed Pods Frameworks"; | |
| 365 | + outputFileListPaths = ( | |
| 366 | + ); | |
| 367 | + outputPaths = ( | |
| 368 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AFNetworking.framework", | |
| 369 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBaseKit.framework", | |
| 370 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCommonCategory.framework", | |
| 371 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveRequestBastKit.framework", | |
| 372 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJExtension.framework", | |
| 373 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Masonry.framework", | |
| 374 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/QMUIKit.framework", | |
| 375 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Realm.framework", | |
| 376 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework", | |
| 377 | + ); | |
| 378 | + runOnlyForDeploymentPostprocessing = 0; | |
| 379 | + shellPath = /bin/sh; | |
| 380 | + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CNLiveSubsList_Tests/Pods-CNLiveSubsList_Tests-frameworks.sh\"\n"; | |
| 381 | + showEnvVarsInLog = 0; | |
| 382 | + }; | |
| 383 | + DD7D5D091744AF0A8F7F7C27 /* [CP] Check Pods Manifest.lock */ = { | |
| 384 | + isa = PBXShellScriptBuildPhase; | |
| 385 | + buildActionMask = 2147483647; | |
| 386 | + files = ( | |
| 387 | + ); | |
| 388 | + inputFileListPaths = ( | |
| 389 | + ); | |
| 390 | + inputPaths = ( | |
| 391 | + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", | |
| 392 | + "${PODS_ROOT}/Manifest.lock", | |
| 393 | + ); | |
| 394 | + name = "[CP] Check Pods Manifest.lock"; | |
| 395 | + outputFileListPaths = ( | |
| 396 | + ); | |
| 397 | + outputPaths = ( | |
| 398 | + "$(DERIVED_FILE_DIR)/Pods-CNLiveSubsList_Example-checkManifestLockResult.txt", | |
| 399 | + ); | |
| 400 | + runOnlyForDeploymentPostprocessing = 0; | |
| 401 | + shellPath = /bin/sh; | |
| 402 | + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; | |
| 403 | + showEnvVarsInLog = 0; | |
| 404 | + }; | |
| 405 | + FEBDC65778D9AC8C4BA489DC /* [CP] Check Pods Manifest.lock */ = { | |
| 406 | + isa = PBXShellScriptBuildPhase; | |
| 407 | + buildActionMask = 2147483647; | |
| 408 | + files = ( | |
| 409 | + ); | |
| 410 | + inputFileListPaths = ( | |
| 411 | + ); | |
| 412 | + inputPaths = ( | |
| 413 | + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", | |
| 414 | + "${PODS_ROOT}/Manifest.lock", | |
| 415 | + ); | |
| 416 | + name = "[CP] Check Pods Manifest.lock"; | |
| 417 | + outputFileListPaths = ( | |
| 418 | + ); | |
| 419 | + outputPaths = ( | |
| 420 | + "$(DERIVED_FILE_DIR)/Pods-CNLiveSubsList_Tests-checkManifestLockResult.txt", | |
| 421 | + ); | |
| 422 | + runOnlyForDeploymentPostprocessing = 0; | |
| 423 | + shellPath = /bin/sh; | |
| 424 | + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; | |
| 425 | + showEnvVarsInLog = 0; | |
| 426 | + }; | |
| 427 | +/* End PBXShellScriptBuildPhase section */ | |
| 428 | + | |
| 429 | +/* Begin PBXSourcesBuildPhase section */ | |
| 430 | + 6003F586195388D20070C39A /* Sources */ = { | |
| 431 | + isa = PBXSourcesBuildPhase; | |
| 432 | + buildActionMask = 2147483647; | |
| 433 | + files = ( | |
| 434 | + 6003F59E195388D20070C39A /* CNLiveAppDelegate.m in Sources */, | |
| 435 | + 6003F5A7195388D20070C39A /* CNLiveViewController.m in Sources */, | |
| 436 | + 6003F59A195388D20070C39A /* main.m in Sources */, | |
| 437 | + ); | |
| 438 | + runOnlyForDeploymentPostprocessing = 0; | |
| 439 | + }; | |
| 440 | + 6003F5AA195388D20070C39A /* Sources */ = { | |
| 441 | + isa = PBXSourcesBuildPhase; | |
| 442 | + buildActionMask = 2147483647; | |
| 443 | + files = ( | |
| 444 | + 6003F5BC195388D20070C39A /* Tests.m in Sources */, | |
| 445 | + ); | |
| 446 | + runOnlyForDeploymentPostprocessing = 0; | |
| 447 | + }; | |
| 448 | +/* End PBXSourcesBuildPhase section */ | |
| 449 | + | |
| 450 | +/* Begin PBXTargetDependency section */ | |
| 451 | + 6003F5B4195388D20070C39A /* PBXTargetDependency */ = { | |
| 452 | + isa = PBXTargetDependency; | |
| 453 | + target = 6003F589195388D20070C39A /* CNLiveSubsList_Example */; | |
| 454 | + targetProxy = 6003F5B3195388D20070C39A /* PBXContainerItemProxy */; | |
| 455 | + }; | |
| 456 | +/* End PBXTargetDependency section */ | |
| 457 | + | |
| 458 | +/* Begin PBXVariantGroup section */ | |
| 459 | + 6003F596195388D20070C39A /* InfoPlist.strings */ = { | |
| 460 | + isa = PBXVariantGroup; | |
| 461 | + children = ( | |
| 462 | + 6003F597195388D20070C39A /* en */, | |
| 463 | + ); | |
| 464 | + name = InfoPlist.strings; | |
| 465 | + sourceTree = "<group>"; | |
| 466 | + }; | |
| 467 | + 6003F5B8195388D20070C39A /* InfoPlist.strings */ = { | |
| 468 | + isa = PBXVariantGroup; | |
| 469 | + children = ( | |
| 470 | + 6003F5B9195388D20070C39A /* en */, | |
| 471 | + ); | |
| 472 | + name = InfoPlist.strings; | |
| 473 | + sourceTree = "<group>"; | |
| 474 | + }; | |
| 475 | + 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */ = { | |
| 476 | + isa = PBXVariantGroup; | |
| 477 | + children = ( | |
| 478 | + 71719F9E1E33DC2100824A3D /* Base */, | |
| 479 | + ); | |
| 480 | + name = LaunchScreen.storyboard; | |
| 481 | + sourceTree = "<group>"; | |
| 482 | + }; | |
| 483 | +/* End PBXVariantGroup section */ | |
| 484 | + | |
| 485 | +/* Begin XCBuildConfiguration section */ | |
| 486 | + 6003F5BD195388D20070C39A /* Debug */ = { | |
| 487 | + isa = XCBuildConfiguration; | |
| 488 | + buildSettings = { | |
| 489 | + ALWAYS_SEARCH_USER_PATHS = NO; | |
| 490 | + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; | |
| 491 | + CLANG_CXX_LIBRARY = "libc++"; | |
| 492 | + CLANG_ENABLE_MODULES = YES; | |
| 493 | + CLANG_ENABLE_OBJC_ARC = YES; | |
| 494 | + CLANG_WARN_BOOL_CONVERSION = YES; | |
| 495 | + CLANG_WARN_CONSTANT_CONVERSION = YES; | |
| 496 | + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; | |
| 497 | + CLANG_WARN_EMPTY_BODY = YES; | |
| 498 | + CLANG_WARN_ENUM_CONVERSION = YES; | |
| 499 | + CLANG_WARN_INT_CONVERSION = YES; | |
| 500 | + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | |
| 501 | + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; | |
| 502 | + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; | |
| 503 | + COPY_PHASE_STRIP = NO; | |
| 504 | + ENABLE_TESTABILITY = YES; | |
| 505 | + GCC_C_LANGUAGE_STANDARD = gnu99; | |
| 506 | + GCC_DYNAMIC_NO_PIC = NO; | |
| 507 | + GCC_OPTIMIZATION_LEVEL = 0; | |
| 508 | + GCC_PREPROCESSOR_DEFINITIONS = ( | |
| 509 | + "DEBUG=1", | |
| 510 | + "$(inherited)", | |
| 511 | + ); | |
| 512 | + GCC_SYMBOLS_PRIVATE_EXTERN = NO; | |
| 513 | + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; | |
| 514 | + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; | |
| 515 | + GCC_WARN_UNDECLARED_SELECTOR = YES; | |
| 516 | + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | |
| 517 | + GCC_WARN_UNUSED_FUNCTION = YES; | |
| 518 | + GCC_WARN_UNUSED_VARIABLE = YES; | |
| 519 | + IPHONEOS_DEPLOYMENT_TARGET = 9.3; | |
| 520 | + ONLY_ACTIVE_ARCH = YES; | |
| 521 | + SDKROOT = iphoneos; | |
| 522 | + TARGETED_DEVICE_FAMILY = "1,2"; | |
| 523 | + }; | |
| 524 | + name = Debug; | |
| 525 | + }; | |
| 526 | + 6003F5BE195388D20070C39A /* Release */ = { | |
| 527 | + isa = XCBuildConfiguration; | |
| 528 | + buildSettings = { | |
| 529 | + ALWAYS_SEARCH_USER_PATHS = NO; | |
| 530 | + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; | |
| 531 | + CLANG_CXX_LIBRARY = "libc++"; | |
| 532 | + CLANG_ENABLE_MODULES = YES; | |
| 533 | + CLANG_ENABLE_OBJC_ARC = YES; | |
| 534 | + CLANG_WARN_BOOL_CONVERSION = YES; | |
| 535 | + CLANG_WARN_CONSTANT_CONVERSION = YES; | |
| 536 | + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; | |
| 537 | + CLANG_WARN_EMPTY_BODY = YES; | |
| 538 | + CLANG_WARN_ENUM_CONVERSION = YES; | |
| 539 | + CLANG_WARN_INT_CONVERSION = YES; | |
| 540 | + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | |
| 541 | + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; | |
| 542 | + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; | |
| 543 | + COPY_PHASE_STRIP = YES; | |
| 544 | + ENABLE_NS_ASSERTIONS = NO; | |
| 545 | + GCC_C_LANGUAGE_STANDARD = gnu99; | |
| 546 | + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; | |
| 547 | + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; | |
| 548 | + GCC_WARN_UNDECLARED_SELECTOR = YES; | |
| 549 | + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | |
| 550 | + GCC_WARN_UNUSED_FUNCTION = YES; | |
| 551 | + GCC_WARN_UNUSED_VARIABLE = YES; | |
| 552 | + IPHONEOS_DEPLOYMENT_TARGET = 9.3; | |
| 553 | + SDKROOT = iphoneos; | |
| 554 | + TARGETED_DEVICE_FAMILY = "1,2"; | |
| 555 | + VALIDATE_PRODUCT = YES; | |
| 556 | + }; | |
| 557 | + name = Release; | |
| 558 | + }; | |
| 559 | + 6003F5C0195388D20070C39A /* Debug */ = { | |
| 560 | + isa = XCBuildConfiguration; | |
| 561 | + baseConfigurationReference = 898896A193095E14046F578C /* Pods-CNLiveSubsList_Example.debug.xcconfig */; | |
| 562 | + buildSettings = { | |
| 563 | + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | |
| 564 | + DEVELOPMENT_TEAM = 94X49GG3ZW; | |
| 565 | + GCC_PRECOMPILE_PREFIX_HEADER = YES; | |
| 566 | + GCC_PREFIX_HEADER = "CNLiveSubsList/CNLiveSubsList-Prefix.pch"; | |
| 567 | + INFOPLIST_FILE = "CNLiveSubsList/CNLiveSubsList-Info.plist"; | |
| 568 | + IPHONEOS_DEPLOYMENT_TARGET = 9.3; | |
| 569 | + MODULE_NAME = ExampleApp; | |
| 570 | + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; | |
| 571 | + PRODUCT_NAME = "$(TARGET_NAME)"; | |
| 572 | + WRAPPER_EXTENSION = app; | |
| 573 | + }; | |
| 574 | + name = Debug; | |
| 575 | + }; | |
| 576 | + 6003F5C1195388D20070C39A /* Release */ = { | |
| 577 | + isa = XCBuildConfiguration; | |
| 578 | + baseConfigurationReference = F5730D3271C7691032879E96 /* Pods-CNLiveSubsList_Example.release.xcconfig */; | |
| 579 | + buildSettings = { | |
| 580 | + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | |
| 581 | + DEVELOPMENT_TEAM = 94X49GG3ZW; | |
| 582 | + GCC_PRECOMPILE_PREFIX_HEADER = YES; | |
| 583 | + GCC_PREFIX_HEADER = "CNLiveSubsList/CNLiveSubsList-Prefix.pch"; | |
| 584 | + INFOPLIST_FILE = "CNLiveSubsList/CNLiveSubsList-Info.plist"; | |
| 585 | + IPHONEOS_DEPLOYMENT_TARGET = 9.3; | |
| 586 | + MODULE_NAME = ExampleApp; | |
| 587 | + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; | |
| 588 | + PRODUCT_NAME = "$(TARGET_NAME)"; | |
| 589 | + WRAPPER_EXTENSION = app; | |
| 590 | + }; | |
| 591 | + name = Release; | |
| 592 | + }; | |
| 593 | + 6003F5C3195388D20070C39A /* Debug */ = { | |
| 594 | + isa = XCBuildConfiguration; | |
| 595 | + baseConfigurationReference = 82061A3F2A0FEAC3B64A32E1 /* Pods-CNLiveSubsList_Tests.debug.xcconfig */; | |
| 596 | + buildSettings = { | |
| 597 | + BUNDLE_LOADER = "$(TEST_HOST)"; | |
| 598 | + FRAMEWORK_SEARCH_PATHS = ( | |
| 599 | + "$(SDKROOT)/Developer/Library/Frameworks", | |
| 600 | + "$(inherited)", | |
| 601 | + "$(DEVELOPER_FRAMEWORKS_DIR)", | |
| 602 | + ); | |
| 603 | + GCC_PRECOMPILE_PREFIX_HEADER = YES; | |
| 604 | + GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; | |
| 605 | + GCC_PREPROCESSOR_DEFINITIONS = ( | |
| 606 | + "DEBUG=1", | |
| 607 | + "$(inherited)", | |
| 608 | + ); | |
| 609 | + INFOPLIST_FILE = "Tests/Tests-Info.plist"; | |
| 610 | + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; | |
| 611 | + PRODUCT_NAME = "$(TARGET_NAME)"; | |
| 612 | + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CNLiveSubsList_Example.app/CNLiveSubsList_Example"; | |
| 613 | + WRAPPER_EXTENSION = xctest; | |
| 614 | + }; | |
| 615 | + name = Debug; | |
| 616 | + }; | |
| 617 | + 6003F5C4195388D20070C39A /* Release */ = { | |
| 618 | + isa = XCBuildConfiguration; | |
| 619 | + baseConfigurationReference = 3E2A2BD79227FFA7EB45536D /* Pods-CNLiveSubsList_Tests.release.xcconfig */; | |
| 620 | + buildSettings = { | |
| 621 | + BUNDLE_LOADER = "$(TEST_HOST)"; | |
| 622 | + FRAMEWORK_SEARCH_PATHS = ( | |
| 623 | + "$(SDKROOT)/Developer/Library/Frameworks", | |
| 624 | + "$(inherited)", | |
| 625 | + "$(DEVELOPER_FRAMEWORKS_DIR)", | |
| 626 | + ); | |
| 627 | + GCC_PRECOMPILE_PREFIX_HEADER = YES; | |
| 628 | + GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; | |
| 629 | + INFOPLIST_FILE = "Tests/Tests-Info.plist"; | |
| 630 | + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; | |
| 631 | + PRODUCT_NAME = "$(TARGET_NAME)"; | |
| 632 | + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CNLiveSubsList_Example.app/CNLiveSubsList_Example"; | |
| 633 | + WRAPPER_EXTENSION = xctest; | |
| 634 | + }; | |
| 635 | + name = Release; | |
| 636 | + }; | |
| 637 | +/* End XCBuildConfiguration section */ | |
| 638 | + | |
| 639 | +/* Begin XCConfigurationList section */ | |
| 640 | + 6003F585195388D10070C39A /* Build configuration list for PBXProject "CNLiveSubsList" */ = { | |
| 641 | + isa = XCConfigurationList; | |
| 642 | + buildConfigurations = ( | |
| 643 | + 6003F5BD195388D20070C39A /* Debug */, | |
| 644 | + 6003F5BE195388D20070C39A /* Release */, | |
| 645 | + ); | |
| 646 | + defaultConfigurationIsVisible = 0; | |
| 647 | + defaultConfigurationName = Release; | |
| 648 | + }; | |
| 649 | + 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "CNLiveSubsList_Example" */ = { | |
| 650 | + isa = XCConfigurationList; | |
| 651 | + buildConfigurations = ( | |
| 652 | + 6003F5C0195388D20070C39A /* Debug */, | |
| 653 | + 6003F5C1195388D20070C39A /* Release */, | |
| 654 | + ); | |
| 655 | + defaultConfigurationIsVisible = 0; | |
| 656 | + defaultConfigurationName = Release; | |
| 657 | + }; | |
| 658 | + 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "CNLiveSubsList_Tests" */ = { | |
| 659 | + isa = XCConfigurationList; | |
| 660 | + buildConfigurations = ( | |
| 661 | + 6003F5C3195388D20070C39A /* Debug */, | |
| 662 | + 6003F5C4195388D20070C39A /* Release */, | |
| 663 | + ); | |
| 664 | + defaultConfigurationIsVisible = 0; | |
| 665 | + defaultConfigurationName = Release; | |
| 666 | + }; | |
| 667 | +/* End XCConfigurationList section */ | |
| 668 | + }; | |
| 669 | + rootObject = 6003F582195388D10070C39A /* Project object */; | |
| 670 | +} | ... | ... |
Example/CNLiveSubsList.xcodeproj/xcshareddata/xcschemes/CNLiveSubsList-Example.xcscheme
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<Scheme | |
| 3 | + LastUpgradeVersion = "0720" | |
| 4 | + version = "1.3"> | |
| 5 | + <BuildAction | |
| 6 | + parallelizeBuildables = "YES" | |
| 7 | + buildImplicitDependencies = "YES"> | |
| 8 | + <BuildActionEntries> | |
| 9 | + <BuildActionEntry | |
| 10 | + buildForTesting = "YES" | |
| 11 | + buildForRunning = "YES" | |
| 12 | + buildForProfiling = "YES" | |
| 13 | + buildForArchiving = "YES" | |
| 14 | + buildForAnalyzing = "YES"> | |
| 15 | + <BuildableReference | |
| 16 | + BuildableIdentifier = "primary" | |
| 17 | + BlueprintIdentifier = "6003F589195388D20070C39A" | |
| 18 | + BuildableName = "CNLiveSubsList_Example.app" | |
| 19 | + BlueprintName = "CNLiveSubsList_Example" | |
| 20 | + ReferencedContainer = "container:CNLiveSubsList.xcodeproj"> | |
| 21 | + </BuildableReference> | |
| 22 | + </BuildActionEntry> | |
| 23 | + </BuildActionEntries> | |
| 24 | + </BuildAction> | |
| 25 | + <TestAction | |
| 26 | + buildConfiguration = "Debug" | |
| 27 | + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | |
| 28 | + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | |
| 29 | + shouldUseLaunchSchemeArgsEnv = "YES"> | |
| 30 | + <Testables> | |
| 31 | + <TestableReference | |
| 32 | + skipped = "NO"> | |
| 33 | + <BuildableReference | |
| 34 | + BuildableIdentifier = "primary" | |
| 35 | + BlueprintIdentifier = "6003F5AD195388D20070C39A" | |
| 36 | + BuildableName = "CNLiveSubsList_Tests.xctest" | |
| 37 | + BlueprintName = "CNLiveSubsList_Tests" | |
| 38 | + ReferencedContainer = "container:CNLiveSubsList.xcodeproj"> | |
| 39 | + </BuildableReference> | |
| 40 | + </TestableReference> | |
| 41 | + </Testables> | |
| 42 | + <MacroExpansion> | |
| 43 | + <BuildableReference | |
| 44 | + BuildableIdentifier = "primary" | |
| 45 | + BlueprintIdentifier = "6003F589195388D20070C39A" | |
| 46 | + BuildableName = "CNLiveSubsList_Example.app" | |
| 47 | + BlueprintName = "CNLiveSubsList_Example" | |
| 48 | + ReferencedContainer = "container:CNLiveSubsList.xcodeproj"> | |
| 49 | + </BuildableReference> | |
| 50 | + </MacroExpansion> | |
| 51 | + <AdditionalOptions> | |
| 52 | + </AdditionalOptions> | |
| 53 | + </TestAction> | |
| 54 | + <LaunchAction | |
| 55 | + buildConfiguration = "Debug" | |
| 56 | + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | |
| 57 | + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | |
| 58 | + launchStyle = "0" | |
| 59 | + useCustomWorkingDirectory = "NO" | |
| 60 | + ignoresPersistentStateOnLaunch = "NO" | |
| 61 | + debugDocumentVersioning = "YES" | |
| 62 | + debugServiceExtension = "internal" | |
| 63 | + allowLocationSimulation = "YES"> | |
| 64 | + <BuildableProductRunnable | |
| 65 | + runnableDebuggingMode = "0"> | |
| 66 | + <BuildableReference | |
| 67 | + BuildableIdentifier = "primary" | |
| 68 | + BlueprintIdentifier = "6003F589195388D20070C39A" | |
| 69 | + BuildableName = "CNLiveSubsList_Example.app" | |
| 70 | + BlueprintName = "CNLiveSubsList_Example" | |
| 71 | + ReferencedContainer = "container:CNLiveSubsList.xcodeproj"> | |
| 72 | + </BuildableReference> | |
| 73 | + </BuildableProductRunnable> | |
| 74 | + <AdditionalOptions> | |
| 75 | + </AdditionalOptions> | |
| 76 | + </LaunchAction> | |
| 77 | + <ProfileAction | |
| 78 | + buildConfiguration = "Release" | |
| 79 | + shouldUseLaunchSchemeArgsEnv = "YES" | |
| 80 | + savedToolIdentifier = "" | |
| 81 | + useCustomWorkingDirectory = "NO" | |
| 82 | + debugDocumentVersioning = "YES"> | |
| 83 | + <BuildableProductRunnable | |
| 84 | + runnableDebuggingMode = "0"> | |
| 85 | + <BuildableReference | |
| 86 | + BuildableIdentifier = "primary" | |
| 87 | + BlueprintIdentifier = "6003F589195388D20070C39A" | |
| 88 | + BuildableName = "CNLiveSubsList_Example.app" | |
| 89 | + BlueprintName = "CNLiveSubsList_Example" | |
| 90 | + ReferencedContainer = "container:CNLiveSubsList.xcodeproj"> | |
| 91 | + </BuildableReference> | |
| 92 | + </BuildableProductRunnable> | |
| 93 | + </ProfileAction> | |
| 94 | + <AnalyzeAction | |
| 95 | + buildConfiguration = "Debug"> | |
| 96 | + </AnalyzeAction> | |
| 97 | + <ArchiveAction | |
| 98 | + buildConfiguration = "Release" | |
| 99 | + revealArchiveInOrganizer = "YES"> | |
| 100 | + </ArchiveAction> | |
| 101 | +</Scheme> | ... | ... |
Example/CNLiveSubsList/Base.lproj/LaunchScreen.storyboard
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM"> | |
| 3 | + <device id="retina4_7" orientation="portrait"> | |
| 4 | + <adaptation id="fullscreen"/> | |
| 5 | + </device> | |
| 6 | + <dependencies> | |
| 7 | + <deployment identifier="iOS"/> | |
| 8 | + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/> | |
| 9 | + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | |
| 10 | + </dependencies> | |
| 11 | + <scenes> | |
| 12 | + <!--View Controller--> | |
| 13 | + <scene sceneID="EHf-IW-A2E"> | |
| 14 | + <objects> | |
| 15 | + <viewController id="01J-lp-oVM" sceneMemberID="viewController"> | |
| 16 | + <layoutGuides> | |
| 17 | + <viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/> | |
| 18 | + <viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/> | |
| 19 | + </layoutGuides> | |
| 20 | + <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> | |
| 21 | + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | |
| 22 | + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | |
| 23 | + <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | |
| 24 | + </view> | |
| 25 | + </viewController> | |
| 26 | + <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> | |
| 27 | + </objects> | |
| 28 | + <point key="canvasLocation" x="53" y="375"/> | |
| 29 | + </scene> | |
| 30 | + </scenes> | |
| 31 | +</document> | ... | ... |
Example/CNLiveSubsList/Base.lproj/Main.storyboard
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="whP-gf-Uak"> | |
| 3 | + <device id="retina4_7" orientation="portrait"> | |
| 4 | + <adaptation id="fullscreen"/> | |
| 5 | + </device> | |
| 6 | + <dependencies> | |
| 7 | + <deployment identifier="iOS"/> | |
| 8 | + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/> | |
| 9 | + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | |
| 10 | + </dependencies> | |
| 11 | + <scenes> | |
| 12 | + <!--View Controller--> | |
| 13 | + <scene sceneID="wQg-tq-qST"> | |
| 14 | + <objects> | |
| 15 | + <viewController id="whP-gf-Uak" customClass="CNLiveViewController" sceneMemberID="viewController"> | |
| 16 | + <layoutGuides> | |
| 17 | + <viewControllerLayoutGuide type="top" id="uEw-UM-LJ8"/> | |
| 18 | + <viewControllerLayoutGuide type="bottom" id="Mvr-aV-6Um"/> | |
| 19 | + </layoutGuides> | |
| 20 | + <view key="view" contentMode="scaleToFill" id="TpU-gO-2f1"> | |
| 21 | + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | |
| 22 | + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | |
| 23 | + <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | |
| 24 | + </view> | |
| 25 | + </viewController> | |
| 26 | + <placeholder placeholderIdentifier="IBFirstResponder" id="tc2-Qw-aMS" userLabel="First Responder" sceneMemberID="firstResponder"/> | |
| 27 | + </objects> | |
| 28 | + <point key="canvasLocation" x="305" y="433"/> | |
| 29 | + </scene> | |
| 30 | + </scenes> | |
| 31 | +</document> | ... | ... |
Example/CNLiveSubsList/CNLiveAppDelegate.h
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveAppDelegate.h | |
| 3 | +// CNLiveSubsList | |
| 4 | +// | |
| 5 | +// Created by 殷巧娟 on 02/15/2019. | |
| 6 | +// Copyright (c) 2019 殷巧娟. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +@import UIKit; | |
| 10 | + | |
| 11 | +@interface CNLiveAppDelegate : UIResponder <UIApplicationDelegate> | |
| 12 | + | |
| 13 | +@property (strong, nonatomic) UIWindow *window; | |
| 14 | + | |
| 15 | +@end | ... | ... |
Example/CNLiveSubsList/CNLiveAppDelegate.m
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveAppDelegate.m | |
| 3 | +// CNLiveSubsList | |
| 4 | +// | |
| 5 | +// Created by 殷巧娟 on 02/15/2019. | |
| 6 | +// Copyright (c) 2019 殷巧娟. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "CNLiveAppDelegate.h" | |
| 10 | + | |
| 11 | +@implementation CNLiveAppDelegate | |
| 12 | + | |
| 13 | +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
| 14 | +{ | |
| 15 | + // Override point for customization after application launch. | |
| 16 | + return YES; | |
| 17 | +} | |
| 18 | + | |
| 19 | +- (void)applicationWillResignActive:(UIApplication *)application | |
| 20 | +{ | |
| 21 | + // 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. | |
| 22 | + // 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. | |
| 23 | +} | |
| 24 | + | |
| 25 | +- (void)applicationDidEnterBackground:(UIApplication *)application | |
| 26 | +{ | |
| 27 | + // 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. | |
| 28 | + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. | |
| 29 | +} | |
| 30 | + | |
| 31 | +- (void)applicationWillEnterForeground:(UIApplication *)application | |
| 32 | +{ | |
| 33 | + // 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. | |
| 34 | +} | |
| 35 | + | |
| 36 | +- (void)applicationDidBecomeActive:(UIApplication *)application | |
| 37 | +{ | |
| 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 | +{ | |
| 43 | + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. | |
| 44 | +} | |
| 45 | + | |
| 46 | +@end | ... | ... |
Example/CNLiveSubsList/CNLiveSubsList-Info.plist
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| 3 | +<plist version="1.0"> | |
| 4 | +<dict> | |
| 5 | + <key>CFBundleDevelopmentRegion</key> | |
| 6 | + <string>en</string> | |
| 7 | + <key>CFBundleDisplayName</key> | |
| 8 | + <string>${PRODUCT_NAME}</string> | |
| 9 | + <key>CFBundleExecutable</key> | |
| 10 | + <string>${EXECUTABLE_NAME}</string> | |
| 11 | + <key>CFBundleIdentifier</key> | |
| 12 | + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | |
| 13 | + <key>CFBundleInfoDictionaryVersion</key> | |
| 14 | + <string>6.0</string> | |
| 15 | + <key>CFBundleName</key> | |
| 16 | + <string>${PRODUCT_NAME}</string> | |
| 17 | + <key>CFBundlePackageType</key> | |
| 18 | + <string>APPL</string> | |
| 19 | + <key>CFBundleShortVersionString</key> | |
| 20 | + <string>1.0</string> | |
| 21 | + <key>CFBundleSignature</key> | |
| 22 | + <string>????</string> | |
| 23 | + <key>CFBundleVersion</key> | |
| 24 | + <string>1.0</string> | |
| 25 | + <key>LSRequiresIPhoneOS</key> | |
| 26 | + <true/> | |
| 27 | + <key>UILaunchStoryboardName</key> | |
| 28 | + <string>LaunchScreen</string> | |
| 29 | + <key>UIMainStoryboardFile</key> | |
| 30 | + <string>Main</string> | |
| 31 | + <key>UIRequiredDeviceCapabilities</key> | |
| 32 | + <array> | |
| 33 | + <string>armv7</string> | |
| 34 | + </array> | |
| 35 | + <key>UISupportedInterfaceOrientations</key> | |
| 36 | + <array> | |
| 37 | + <string>UIInterfaceOrientationPortrait</string> | |
| 38 | + <string>UIInterfaceOrientationLandscapeLeft</string> | |
| 39 | + <string>UIInterfaceOrientationLandscapeRight</string> | |
| 40 | + </array> | |
| 41 | + <key>UISupportedInterfaceOrientations~ipad</key> | |
| 42 | + <array> | |
| 43 | + <string>UIInterfaceOrientationPortrait</string> | |
| 44 | + <string>UIInterfaceOrientationPortraitUpsideDown</string> | |
| 45 | + <string>UIInterfaceOrientationLandscapeLeft</string> | |
| 46 | + <string>UIInterfaceOrientationLandscapeRight</string> | |
| 47 | + </array> | |
| 48 | +</dict> | |
| 49 | +</plist> | ... | ... |
Example/CNLiveSubsList/CNLiveSubsList-Prefix.pch
0 → 100644
| 1 | +// | |
| 2 | +// Prefix header | |
| 3 | +// | |
| 4 | +// The contents of this file are implicitly included at the beginning of every source file. | |
| 5 | +// | |
| 6 | + | |
| 7 | +#import <Availability.h> | |
| 8 | + | |
| 9 | +#ifndef __IPHONE_5_0 | |
| 10 | +#warning "This project uses features only available in iOS SDK 5.0 and later." | |
| 11 | +#endif | |
| 12 | + | |
| 13 | +#ifdef __OBJC__ | |
| 14 | + @import UIKit; | |
| 15 | + @import Foundation; | |
| 16 | +#endif | ... | ... |
Example/CNLiveSubsList/CNLiveViewController.h
0 → 100644
Example/CNLiveSubsList/CNLiveViewController.m
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveViewController.m | |
| 3 | +// CNLiveSubsList | |
| 4 | +// | |
| 5 | +// Created by 殷巧娟 on 02/15/2019. | |
| 6 | +// Copyright (c) 2019 殷巧娟. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "CNLiveViewController.h" | |
| 10 | +#import "CNLiveSubsListViewController.h" | |
| 11 | +@interface CNLiveViewController () | |
| 12 | +@end | |
| 13 | + | |
| 14 | +@implementation CNLiveViewController | |
| 15 | + | |
| 16 | +- (void)viewDidLoad | |
| 17 | +{ | |
| 18 | + [super viewDidLoad]; | |
| 19 | + UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; | |
| 20 | + button.frame = CGRectMake(100, 100, 100, 100); | |
| 21 | + button.backgroundColor = [UIColor cyanColor]; | |
| 22 | + [button addTarget:self action:@selector(buttonClicked) forControlEvents:UIControlEventTouchUpInside]; | |
| 23 | + [self.view addSubview:button]; | |
| 24 | + | |
| 25 | + // Do any additional setup after loading the view, typically from a nib. | |
| 26 | +} | |
| 27 | +- (void)buttonClicked { | |
| 28 | + CNLiveSubsListViewController *vc = [[CNLiveSubsListViewController alloc]init]; | |
| 29 | + vc.view.backgroundColor = [UIColor whiteColor]; | |
| 30 | + [self presentViewController:vc animated:YES completion:nil]; | |
| 31 | +} | |
| 32 | +- (void)didReceiveMemoryWarning | |
| 33 | +{ | |
| 34 | + [super didReceiveMemoryWarning]; | |
| 35 | + // Dispose of any resources that can be recreated. | |
| 36 | +} | |
| 37 | + | |
| 38 | +@end | ... | ... |
Example/CNLiveSubsList/Images.xcassets/AppIcon.appiconset/Contents.json
0 → 100644
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "iphone", | |
| 5 | + "size" : "20x20", | |
| 6 | + "scale" : "2x" | |
| 7 | + }, | |
| 8 | + { | |
| 9 | + "idiom" : "iphone", | |
| 10 | + "size" : "20x20", | |
| 11 | + "scale" : "3x" | |
| 12 | + }, | |
| 13 | + { | |
| 14 | + "idiom" : "iphone", | |
| 15 | + "size" : "29x29", | |
| 16 | + "scale" : "2x" | |
| 17 | + }, | |
| 18 | + { | |
| 19 | + "idiom" : "iphone", | |
| 20 | + "size" : "29x29", | |
| 21 | + "scale" : "3x" | |
| 22 | + }, | |
| 23 | + { | |
| 24 | + "idiom" : "iphone", | |
| 25 | + "size" : "40x40", | |
| 26 | + "scale" : "2x" | |
| 27 | + }, | |
| 28 | + { | |
| 29 | + "idiom" : "iphone", | |
| 30 | + "size" : "40x40", | |
| 31 | + "scale" : "3x" | |
| 32 | + }, | |
| 33 | + { | |
| 34 | + "idiom" : "iphone", | |
| 35 | + "size" : "60x60", | |
| 36 | + "scale" : "2x" | |
| 37 | + }, | |
| 38 | + { | |
| 39 | + "idiom" : "iphone", | |
| 40 | + "size" : "60x60", | |
| 41 | + "scale" : "3x" | |
| 42 | + }, | |
| 43 | + { | |
| 44 | + "idiom" : "ipad", | |
| 45 | + "size" : "20x20", | |
| 46 | + "scale" : "1x" | |
| 47 | + }, | |
| 48 | + { | |
| 49 | + "idiom" : "ipad", | |
| 50 | + "size" : "20x20", | |
| 51 | + "scale" : "2x" | |
| 52 | + }, | |
| 53 | + { | |
| 54 | + "idiom" : "ipad", | |
| 55 | + "size" : "29x29", | |
| 56 | + "scale" : "1x" | |
| 57 | + }, | |
| 58 | + { | |
| 59 | + "idiom" : "ipad", | |
| 60 | + "size" : "29x29", | |
| 61 | + "scale" : "2x" | |
| 62 | + }, | |
| 63 | + { | |
| 64 | + "idiom" : "ipad", | |
| 65 | + "size" : "40x40", | |
| 66 | + "scale" : "1x" | |
| 67 | + }, | |
| 68 | + { | |
| 69 | + "idiom" : "ipad", | |
| 70 | + "size" : "40x40", | |
| 71 | + "scale" : "2x" | |
| 72 | + }, | |
| 73 | + { | |
| 74 | + "idiom" : "ipad", | |
| 75 | + "size" : "76x76", | |
| 76 | + "scale" : "1x" | |
| 77 | + }, | |
| 78 | + { | |
| 79 | + "idiom" : "ipad", | |
| 80 | + "size" : "76x76", | |
| 81 | + "scale" : "2x" | |
| 82 | + }, | |
| 83 | + { | |
| 84 | + "idiom" : "ipad", | |
| 85 | + "size" : "83.5x83.5", | |
| 86 | + "scale" : "2x" | |
| 87 | + }, | |
| 88 | + { | |
| 89 | + "idiom" : "ios-marketing", | |
| 90 | + "size" : "1024x1024", | |
| 91 | + "scale" : "1x" | |
| 92 | + } | |
| 93 | + ], | |
| 94 | + "info" : { | |
| 95 | + "version" : 1, | |
| 96 | + "author" : "xcode" | |
| 97 | + } | |
| 98 | +} | ... | ... |
Example/CNLiveSubsList/en.lproj/InfoPlist.strings
0 → 100644
Example/CNLiveSubsList/main.m
0 → 100644
| 1 | +// | |
| 2 | +// main.m | |
| 3 | +// CNLiveSubsList | |
| 4 | +// | |
| 5 | +// Created by 殷巧娟 on 02/15/2019. | |
| 6 | +// Copyright (c) 2019 殷巧娟. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +@import UIKit; | |
| 10 | +#import "CNLiveAppDelegate.h" | |
| 11 | + | |
| 12 | +int main(int argc, char * argv[]) | |
| 13 | +{ | |
| 14 | + @autoreleasepool { | |
| 15 | + return UIApplicationMain(argc, argv, nil, NSStringFromClass([CNLiveAppDelegate class])); | |
| 16 | + } | |
| 17 | +} | ... | ... |
Example/Podfile
0 → 100644
| 1 | +source 'https://github.com/CocoaPods/Specs.git' | |
| 2 | +source ‘http://bj.gitlab.cnlive.com/ios-team/CNLiveRepos.git’ | |
| 3 | +use_frameworks! | |
| 4 | + | |
| 5 | +platform :ios, '9.0' | |
| 6 | + | |
| 7 | +target 'CNLiveSubsList_Example' do | |
| 8 | + pod 'CNLiveSubsList', :path => '../' | |
| 9 | + pod 'Masonry' | |
| 10 | + pod 'QMUIKit' | |
| 11 | + pod 'Realm', '~> 2.9.1' | |
| 12 | + pod 'CNLiveCommonCategory' | |
| 13 | + pod 'SDWebImage' | |
| 14 | + pod 'CNLiveBaseKit' | |
| 15 | + pod 'CNLiveRequestBastKit' | |
| 16 | + pod 'MJExtension' | |
| 17 | + target 'CNLiveSubsList_Tests' do | |
| 18 | + inherit! :search_paths | |
| 19 | + pod 'Masonry' | |
| 20 | + pod 'QMUIKit' | |
| 21 | + pod 'Realm', '~> 2.9.1' | |
| 22 | + pod 'CNLiveCommonCategory' | |
| 23 | + pod 'SDWebImage' | |
| 24 | + pod 'CNLiveBaseKit' | |
| 25 | + pod 'CNLiveRequestBastKit' | |
| 26 | + pod 'MJExtension' | |
| 27 | + end | |
| 28 | +end | ... | ... |
Example/Tests/Tests-Info.plist
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| 3 | +<plist version="1.0"> | |
| 4 | +<dict> | |
| 5 | + <key>CFBundleDevelopmentRegion</key> | |
| 6 | + <string>en</string> | |
| 7 | + <key>CFBundleExecutable</key> | |
| 8 | + <string>${EXECUTABLE_NAME}</string> | |
| 9 | + <key>CFBundleIdentifier</key> | |
| 10 | + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | |
| 11 | + <key>CFBundleInfoDictionaryVersion</key> | |
| 12 | + <string>6.0</string> | |
| 13 | + <key>CFBundlePackageType</key> | |
| 14 | + <string>BNDL</string> | |
| 15 | + <key>CFBundleShortVersionString</key> | |
| 16 | + <string>1.0</string> | |
| 17 | + <key>CFBundleSignature</key> | |
| 18 | + <string>????</string> | |
| 19 | + <key>CFBundleVersion</key> | |
| 20 | + <string>1</string> | |
| 21 | +</dict> | |
| 22 | +</plist> | ... | ... |
Example/Tests/Tests-Prefix.pch
0 → 100644
Example/Tests/Tests.m
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveSubsListTests.m | |
| 3 | +// CNLiveSubsListTests | |
| 4 | +// | |
| 5 | +// Created by 殷巧娟 on 02/15/2019. | |
| 6 | +// Copyright (c) 2019 殷巧娟. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +@import XCTest; | |
| 10 | + | |
| 11 | +@interface Tests : XCTestCase | |
| 12 | + | |
| 13 | +@end | |
| 14 | + | |
| 15 | +@implementation Tests | |
| 16 | + | |
| 17 | +- (void)setUp | |
| 18 | +{ | |
| 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 | +{ | |
| 25 | + // Put teardown code here. This method is called after the invocation of each test method in the class. | |
| 26 | + [super tearDown]; | |
| 27 | +} | |
| 28 | + | |
| 29 | +- (void)testExample | |
| 30 | +{ | |
| 31 | + XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); | |
| 32 | +} | |
| 33 | + | |
| 34 | +@end | |
| 35 | + | ... | ... |
Example/Tests/en.lproj/InfoPlist.strings
0 → 100644
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/CNLiveCommonCategory-umbrella.h
0 → 100644
| 1 | +#ifdef __OBJC__ | |
| 2 | +#import <UIKit/UIKit.h> | |
| 3 | +#else | |
| 4 | +#ifndef FOUNDATION_EXPORT | |
| 5 | +#if defined(__cplusplus) | |
| 6 | +#define FOUNDATION_EXPORT extern "C" | |
| 7 | +#else | |
| 8 | +#define FOUNDATION_EXPORT extern | |
| 9 | +#endif | |
| 10 | +#endif | |
| 11 | +#endif | |
| 12 | + | |
| 13 | +#import "NSArray+Safety.h" | |
| 14 | +#import "NSData+Common.h" | |
| 15 | +#import "NSDate+Common.h" | |
| 16 | +#import "NSDictionary+Safety.h" | |
| 17 | +#import "NSObject+CommonBlock.h" | |
| 18 | +#import "NSObject+KVOCategory.h" | |
| 19 | +#import "NSString+Category.h" | |
| 20 | +#import "NSString+RegexCheck.h" | |
| 21 | +#import "NSString+Size.h" | |
| 22 | +#import "NSString+UrlEncode.h" | |
| 23 | +#import "UIButton+CNCountDownButton.h" | |
| 24 | +#import "UIButton+createButton.h" | |
| 25 | +#import "UIColor+CNLiveExtension.h" | |
| 26 | +#import "UIColor+TLChat.h" | |
| 27 | +#import "UIControl+CNEventInterval.h" | |
| 28 | +#import "UIDevice+CNDevice.h" | |
| 29 | +#import "UIImage+Alpha.h" | |
| 30 | +#import "UIImage+CNLiveAdd.h" | |
| 31 | +#import "UIImage+Common.h" | |
| 32 | +#import "UIImage+ImageEffect.h" | |
| 33 | +#import "UIImage+Luban_iOS_Extension_h.h" | |
| 34 | +#import "UIImage+ScaleImageSize.h" | |
| 35 | +#import "UIImage+SGImageSize.h" | |
| 36 | +#import "UIImage+TintColor.h" | |
| 37 | +#import "UIImage+zipData.h" | |
| 38 | +#import "UIImage+ZXExtension.h" | |
| 39 | +#import "UIImageView+InitMethod.h" | |
| 40 | +#import "UIImageView+ZXExtension.h" | |
| 41 | +#import "UILabel+Common.h" | |
| 42 | +#import "UILabel+InitMethod.h" | |
| 43 | +#import "UINavigationBar+NavigationBarBackground.h" | |
| 44 | +#import "UIScrollView+Extensions.h" | |
| 45 | +#import "UIScrollView+Pages.h" | |
| 46 | +#import "UITableView+Hit.h" | |
| 47 | +#import "UITextField+ZXExtension.h" | |
| 48 | +#import "UIViewController+ChildViewController.h" | |
| 49 | +#import "UIView+CaptureImage.h" | |
| 50 | +#import "UIView+CNGradienLayer.h" | |
| 51 | +#import "UIView+CustomAutoLayout.h" | |
| 52 | +#import "UIView+Effect.h" | |
| 53 | +#import "UIView+Glow.h" | |
| 54 | +#import "UIView+Layout.h" | |
| 55 | +#import "UIView+ModifyFrame.h" | |
| 56 | +#import "UIView+RelativeCoordinate.h" | |
| 57 | +#import "UIWindow+CNCurrentViewController.h" | |
| 58 | +#import "CNLiveCommonCategory.h" | |
| 59 | + | |
| 60 | +FOUNDATION_EXPORT double CNLiveCommonCategoryVersionNumber; | |
| 61 | +FOUNDATION_EXPORT const unsigned char CNLiveCommonCategoryVersionString[]; | |
| 62 | + | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/CNLiveCommonCategory.h
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveCommonCategory.h | |
| 3 | +// CNLiveCommonCategory | |
| 4 | +// | |
| 5 | +// Created by 张旭 on 2018/11/5. | |
| 6 | +// Copyright © 2018 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#ifndef CNLiveCommonCategory_h | |
| 10 | +#define CNLiveCommonCategory_h | |
| 11 | + | |
| 12 | +#import "UILabel+InitMethod.h" | |
| 13 | +#import "UILabel+Common.h" | |
| 14 | +#import "UIImageView+InitMethod.h" | |
| 15 | +#import "UIImageView+ZXExtension.h" | |
| 16 | +#import "UIImage+SGImageSize.h" | |
| 17 | +#import "UIImage+ImageEffect.h" | |
| 18 | +#import "UIImage+TintColor.h" | |
| 19 | +#import "UIImage+Alpha.h" | |
| 20 | +#import "UIImage+Common.h" | |
| 21 | +#import "UIImage+ZXExtension.h" | |
| 22 | +#import "UIImage+Luban_iOS_Extension_h.h" | |
| 23 | +#import "UIImage+zipData.h" | |
| 24 | +#import "UIImage+ScaleImageSize.h" | |
| 25 | +#import "UIImage+CNLiveAdd.h" | |
| 26 | +#import "UIScrollView+Pages.h" | |
| 27 | +#import "UIScrollView+Extensions.h" | |
| 28 | +#import "UIControl+CNEventInterval.h" | |
| 29 | +#import "UIDevice+CNDevice.h" | |
| 30 | +#import "NSObject+CommonBlock.h" | |
| 31 | +#import "NSObject+KVOCategory.h" | |
| 32 | +#import "NSData+Common.h" | |
| 33 | +#import "NSDate+Common.h" | |
| 34 | +#import "UIView+Glow.h" | |
| 35 | +#import "UIView+Effect.h" | |
| 36 | +#import "UIView+Layout.h" | |
| 37 | +#import "UIView+ModifyFrame.h" | |
| 38 | +#import "UIView+CaptureImage.h" | |
| 39 | +#import "UIView+CNGradienLayer.h" | |
| 40 | +#import "UIView+RelativeCoordinate.h" | |
| 41 | +#import "UIView+CustomAutoLayout.h" | |
| 42 | +#import "UITableView+Hit.h" | |
| 43 | +#import "UIButton+CNCountDownButton.h" | |
| 44 | +#import "UIButton+createButton.h" | |
| 45 | +#import "UITextField+ZXExtension.h" | |
| 46 | +#import "UIViewController+ChildViewController.h" | |
| 47 | +#import "UIWindow+CNCurrentViewController.h" | |
| 48 | +#import "UINavigationBar+NavigationBarBackground.h" | |
| 49 | +#import "NSArray+Safety.h" | |
| 50 | +#import "NSDictionary+Safety.h" | |
| 51 | +#import "NSString+RegexCheck.h" | |
| 52 | +#import "NSString+Size.h" | |
| 53 | +#import "NSString+UrlEncode.h" | |
| 54 | + | |
| 55 | + | |
| 56 | +#endif /* CNLiveCommonCategory_h */ | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/NSArray+Safety.h
0 → 100644
| 1 | +// | |
| 2 | +// NSArray+Safety.h | |
| 3 | +// CNLive | |
| 4 | +// | |
| 5 | +// Created by 雷浩杰 on 15/9/1. | |
| 6 | +// Copyright (c) 2015年 雷浩杰. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <Foundation/Foundation.h> | |
| 10 | + | |
| 11 | +@interface NSArray (Safety) | |
| 12 | + | |
| 13 | +- (nullable id)safetyObjectAtIndex:(NSUInteger)index; | |
| 14 | + | |
| 15 | +- (nullable id)randomObject; | |
| 16 | + | |
| 17 | ++ (BOOL)isArray:(NSArray *)array; | |
| 18 | + | |
| 19 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/NSData+Common.h
0 → 100644
| 1 | +// | |
| 2 | +// NSData+Common.h | |
| 3 | +// CommonLibrary | |
| 4 | +// | |
| 5 | +// Created by Alexi on 13-11-6. | |
| 6 | +// Copyright (c) 2013年 ywchen. All rights reserved. | |
| 7 | +// | |
| 8 | +#import <Foundation/Foundation.h> | |
| 9 | + | |
| 10 | + | |
| 11 | +void *NewBase64Decode(const char *inputBuffer, size_t length, size_t *outputLength); | |
| 12 | + | |
| 13 | +char *NewBase64Encode(const void *inputBuffer, size_t length, bool separateLines, size_t *outputLength); | |
| 14 | + | |
| 15 | +@interface NSData (Common) | |
| 16 | + | |
| 17 | +@property (nonatomic, readonly) NSString* md5Hash; | |
| 18 | + | |
| 19 | +@property (nonatomic, readonly) NSString* sha1Hash; | |
| 20 | + | |
| 21 | ++ (NSData *)dataFromBase64String:(NSString *)aString; | |
| 22 | +- (NSString *)base64EncodedString; | |
| 23 | +- (NSString *)md5Hash; | |
| 24 | +- (NSString *)sha1Hash; | |
| 25 | + | |
| 26 | +//返回图片data类型jpeg(default) png gif tiff | |
| 27 | +- (NSString *)imageFormatType; | |
| 28 | + | |
| 29 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/NSDate+Common.h
0 → 100644
| 1 | +// | |
| 2 | +// NSDate+Common.h | |
| 3 | +// TIMChat | |
| 4 | +// | |
| 5 | +// Created by AlexiChen on 16/3/16. | |
| 6 | +// Copyright © 2016年 AlexiChen. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <Foundation/Foundation.h> | |
| 10 | + | |
| 11 | +@interface NSDate (Common) | |
| 12 | + | |
| 13 | +- (BOOL)isToday; | |
| 14 | + | |
| 15 | +- (BOOL)isYesterday; | |
| 16 | + | |
| 17 | +- (NSString *)shortTimeTextOfDate; | |
| 18 | + | |
| 19 | +- (NSString *)timeTextOfDate; | |
| 20 | + | |
| 21 | + | |
| 22 | ++ (NSString *)stringFromDate:(NSDate *)date; | |
| 23 | ++ (NSDate *)dateFromString:(NSString *)string; | |
| 24 | ++ (NSTimeInterval)pleaseInsertStarTime:(NSString *)starTime andInsertEndTime:(NSString *)endTime; | |
| 25 | + | |
| 26 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/NSDictionary+Safety.h
0 → 100644
| 1 | +// | |
| 2 | +// NSDictionary+Safety.h | |
| 3 | +// CNLive | |
| 4 | +// | |
| 5 | +// Created by 雷浩杰 on 15/9/1. | |
| 6 | +// Copyright (c) 2015年 雷浩杰. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <Foundation/Foundation.h> | |
| 10 | + | |
| 11 | +@interface NSDictionary (Safety) | |
| 12 | + | |
| 13 | +- (NSDictionary *)validatedDictionary; | |
| 14 | + | |
| 15 | +//字典转json格式字符串: | |
| 16 | +- (NSString *)dictionaryToJson; | |
| 17 | + | |
| 18 | +//- (NSDictionary *)addParameters; | |
| 19 | +// | |
| 20 | +//+ (NSDictionary *)CommonParameters; | |
| 21 | + | |
| 22 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/NSObject+CommonBlock.h
0 → 100644
| 1 | +// | |
| 2 | +// NSObject+CommonBlock.h | |
| 3 | +// CommonLibrary | |
| 4 | +// | |
| 5 | +// Created by Alexi on 3/11/14. | |
| 6 | +// Copyright (c) 2014 CommonLibrary. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <Foundation/Foundation.h> | |
| 10 | + | |
| 11 | +NS_ASSUME_NONNULL_BEGIN | |
| 12 | +typedef void (^CommonVoidBlock)(void); | |
| 13 | + | |
| 14 | +typedef void (^CommonBlock)(id selfPtr); | |
| 15 | + | |
| 16 | +typedef void (^CommonCompletionBlock)(id selfPtr, BOOL isFinished); | |
| 17 | + | |
| 18 | +@interface NSObject (CommonBlock) | |
| 19 | + | |
| 20 | +- (void)excuteBlock:(CommonBlock)block; | |
| 21 | + | |
| 22 | +- (void)performBlock:(CommonBlock)block; | |
| 23 | + | |
| 24 | +//- (void)cancelBlock:(CommonBlock)block; | |
| 25 | + | |
| 26 | +- (void)performBlock:(CommonBlock)block afterDelay:(NSTimeInterval)delay; | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | +- (void)excuteCompletion:(CommonCompletionBlock)block withFinished:(NSNumber *)finished; | |
| 31 | + | |
| 32 | +- (void)performCompletion:(CommonCompletionBlock)block withFinished:(BOOL)finished; | |
| 33 | + | |
| 34 | +// 并发执行tasks里的作务,等tasks执行行完毕,回调到completion | |
| 35 | +- (void)asynExecuteCompletion:(CommonBlock)completion tasks:(CommonBlock)task, ... NS_REQUIRES_NIL_TERMINATION; | |
| 36 | + | |
| 37 | +@end | |
| 38 | +NS_ASSUME_NONNULL_END | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/NSObject+KVOCategory.h
0 → 100644
| 1 | +// | |
| 2 | +// NSObject+KVOCategory.h | |
| 3 | +// CommonLibrary | |
| 4 | +// | |
| 5 | +// Created by Alexi on 5/16/14. | |
| 6 | +// Copyright (c) 2014 Alexi. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | +#if kSupportNSObjectKVOCategory | |
| 13 | +#import <Foundation/Foundation.h> | |
| 14 | + | |
| 15 | +@interface NSObject (KVOCategory) | |
| 16 | + | |
| 17 | + | |
| 18 | +- (void)observedBy:(NSObject *)observer forKeyPaths:(NSArray *)keyPaths; | |
| 19 | + | |
| 20 | +- (void)observedBy:(NSObject *)observer forKeyPaths:(NSArray *)keyPaths options:(NSKeyValueObservingOptions)options; | |
| 21 | + | |
| 22 | +- (void)cancelObservedBy:(NSObject *)observer forKeyPaths:(NSArray *)keyPaths; | |
| 23 | + | |
| 24 | +@end | |
| 25 | +#endif | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/NSString+Category.h
0 → 100644
| 1 | +// | |
| 2 | +// NSString+Category.h | |
| 3 | +// CNLiveCommonCategory | |
| 4 | +// | |
| 5 | +// Created by 张旭 on 2018/12/7. | |
| 6 | +// | |
| 7 | + | |
| 8 | +#import <Foundation/Foundation.h> | |
| 9 | + | |
| 10 | +NS_ASSUME_NONNULL_BEGIN | |
| 11 | + | |
| 12 | +@interface NSString (Category) | |
| 13 | + | |
| 14 | +//获取字符串首字母(传入汉字字符串, 返回大写拼音首字母) | |
| 15 | +- (NSString *)getFirstLetterFromString; | |
| 16 | + | |
| 17 | +//正则表达式验证手机号 | |
| 18 | +- (BOOL)isMobileNumber; | |
| 19 | + | |
| 20 | +- (id)readLocalFile; | |
| 21 | + | |
| 22 | +//获取汉字转成拼音字符串 通讯录模糊搜索 支持拼音检索 首字母 全拼 汉字 | |
| 23 | +- (NSString *)transformToPinyin; | |
| 24 | + | |
| 25 | +//获取文件大大小 | |
| 26 | +- (float)fileSizeAtPath; | |
| 27 | +@end | |
| 28 | + | |
| 29 | +NS_ASSUME_NONNULL_END | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/NSString+RegexCheck.h
0 → 100644
| 1 | +// | |
| 2 | +// NSString+RegexCheck.h | |
| 3 | +// CommonLibrary | |
| 4 | +// | |
| 5 | +// Created by Alexi on 14-2-13. | |
| 6 | +// Copyright (c) 2014年 CommonLibrary. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <Foundation/Foundation.h> | |
| 10 | + | |
| 11 | +@interface NSString (RegexCheck) | |
| 12 | + | |
| 13 | +- (BOOL)matchRegex:(NSString *)regex; | |
| 14 | + | |
| 15 | +- (BOOL)isValidateMobile; | |
| 16 | + | |
| 17 | +-(BOOL)isPastTime; | |
| 18 | + | |
| 19 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/NSString+Size.h
0 → 100644
| 1 | +// | |
| 2 | +// NSString+Size.h | |
| 3 | +// TLKit | |
| 4 | +// | |
| 5 | +// Created by 李伯坤 on 2017/9/11. | |
| 6 | +// Copyright © 2017年 李伯坤. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <Foundation/Foundation.h> | |
| 10 | +#import <UIKit/UIKit.h> | |
| 11 | + | |
| 12 | +@interface NSString (Size) | |
| 13 | + | |
| 14 | +- (CGSize)tt_sizeWithFont:(UIFont *)font; | |
| 15 | + | |
| 16 | +- (CGSize)tt_sizeWithFont:(UIFont *)font constrainedToSize:(CGSize)size; | |
| 17 | +- (CGSize)tt_sizeWithFont:(UIFont *)font constrainedToWidth:(CGFloat)width; | |
| 18 | + | |
| 19 | +- (CGSize)tt_sizeWithFont:(UIFont *)font constrainedToSize:(CGSize)size lineBreakMode:(NSLineBreakMode)lineBreakMode; | |
| 20 | +- (CGSize)tt_sizeWithFont:(UIFont *)font constrainedToWidth:(CGFloat)width lineBreakMode:(NSLineBreakMode)lineBreakMode; | |
| 21 | + | |
| 22 | +- (CGSize)tt_sizeWithFont:(UIFont *)font constrainedToSize:(CGSize)size lineBreakMode:(NSLineBreakMode)lineBreakMode lineSpace:(CGFloat)lineSpace; | |
| 23 | + | |
| 24 | +//规范字符串 | |
| 25 | +-(NSString *)specificationString:(NSString *)string; | |
| 26 | + | |
| 27 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/NSString+UrlEncode.h
0 → 100755
| 1 | +// | |
| 2 | +// NSString+UrlEncode.h | |
| 3 | +// | |
| 4 | +// Created by Kevin Renskers on 31-10-13. | |
| 5 | +// Copyright (c) 2013 Kevin Renskers. All rights reserved. | |
| 6 | +// | |
| 7 | + | |
| 8 | +#import <Foundation/Foundation.h> | |
| 9 | + | |
| 10 | +@interface NSString (UrlEncode) | |
| 11 | + | |
| 12 | +- (NSString *)urlEncode; | |
| 13 | +- (NSString *)urlEncodeUsingEncoding:(NSStringEncoding)encoding; | |
| 14 | +- (NSString *)decodeFromPercentEscapeString; | |
| 15 | +- (NSString*) sha1; | |
| 16 | + | |
| 17 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UIButton+CNCountDownButton.h
0 → 100644
| 1 | +// | |
| 2 | +// UIButton+CNCountDownButton.h | |
| 3 | +// com.cnlive.pro.CNLiveNetAdd | |
| 4 | +// | |
| 5 | +// Created by 流诗语 on 2018/4/10. | |
| 6 | +// Copyright © 2018年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | +@interface UIButton (CNCountDownButton) | |
| 12 | +/** | |
| 13 | + * 倒计时结束的回调 | |
| 14 | + */ | |
| 15 | +@property (nonatomic, copy) void(^buttonTimeStoppedCallback)(void); | |
| 16 | + | |
| 17 | +/** | |
| 18 | + 设置倒计时的间隔和倒计时文案 | |
| 19 | + | |
| 20 | + @param duration 倒计时时间 | |
| 21 | + @param format 可选,传nil默认为 @"%zd秒" | |
| 22 | + */ | |
| 23 | +- (void)CountDownWithTimeInterval:(NSTimeInterval)duration | |
| 24 | + countDownFormat:(NSString *)format; | |
| 25 | + | |
| 26 | +/** | |
| 27 | + * invalidate timer | |
| 28 | + */ | |
| 29 | +- (void)cancelTimer; | |
| 30 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UIButton+createButton.h
0 → 100644
| 1 | +// | |
| 2 | +// UIButton+createButton.h | |
| 3 | +// WonderfulLive | |
| 4 | +// | |
| 5 | +// Created by 张旭 on 2016/11/30. | |
| 6 | +// Copyright © 2016年 CNLive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | +@interface UIButton (createButton) | |
| 12 | + | |
| 13 | +#pragma mark - public method | |
| 14 | + | |
| 15 | +/** | |
| 16 | + 创建UIButton,圆角,边框宽度及颜色,文字及其颜色,字号,对齐方式 | |
| 17 | + | |
| 18 | + @param title 文字 | |
| 19 | + @param titleColor 文字颜色 | |
| 20 | + @param labelFontSize 字体字号 | |
| 21 | + @param labelTextAlginment 文字对齐方式 | |
| 22 | + @param cornerRadius 圆角颁奖 | |
| 23 | + @param borderWidth 边框宽度 | |
| 24 | + @param borderColor 边框颜色 | |
| 25 | + @return 自定义的UIButton | |
| 26 | + */ | |
| 27 | ++ (UIButton * _Nullable)buttonWithTitle:(NSString * _Nullable)title titleColor:(UIColor * _Nullable)titleColor labelFontSize:(CGFloat)labelFontSize labelTextAlginment:(NSTextAlignment)labelTextAlginment cornerRadius:(CGFloat)cornerRadius borderWidth:(CGFloat)borderWidth borderColor:(UIColor * _Nullable)borderColor; | |
| 28 | + | |
| 29 | +/** | |
| 30 | + 创建UIButton,圆角,边框宽度及颜色,文字及其颜色,字号 | |
| 31 | + | |
| 32 | + @param title 文字 | |
| 33 | + @param titleColor 文字颜色 | |
| 34 | + @param labelFontSize 字体字号 | |
| 35 | + @param cornerRadius 圆角半径 | |
| 36 | + @param borderWidth 边框宽度 | |
| 37 | + @param borderColor 边框颜色 | |
| 38 | + @return 自定义的UIButton | |
| 39 | + */ | |
| 40 | ++ (UIButton * _Nullable)buttonWithTitle:(NSString * _Nullable)title titleColor:(UIColor * _Nullable)titleColor labelFontSize:(CGFloat)labelFontSize cornerRadius:(CGFloat)cornerRadius borderWidth:(CGFloat)borderWidth borderColor:(UIColor * _Nullable)borderColor; | |
| 41 | + | |
| 42 | +/** | |
| 43 | + 创建UIButton,文字及其颜色,字体字号 | |
| 44 | + | |
| 45 | + @param title 文字 | |
| 46 | + @param titleColor 文字颜色 | |
| 47 | + @param labelFontSize 字体字号 | |
| 48 | + @return 自定义的UIButton | |
| 49 | + */ | |
| 50 | ++ (UIButton * _Nullable)buttonWithTitle:(NSString * _Nullable)title titleColor:(UIColor * _Nullable)titleColor labelFontSize:(CGFloat)labelFontSize; | |
| 51 | + | |
| 52 | +/** | |
| 53 | + 创建UIButton,背景颜色,圆角,边框宽度及颜色,文字,文字颜色 | |
| 54 | + | |
| 55 | + @param title 文字 | |
| 56 | + @param titleColor 文字颜色 | |
| 57 | + @param cornerRadius 圆角半径 | |
| 58 | + @param borderWidth 边框宽度 | |
| 59 | + @param borderColor 边框颜色 | |
| 60 | + @param backgroundColor 背景颜色 | |
| 61 | + @return 自定义的UIButton | |
| 62 | + */ | |
| 63 | ++ (UIButton * _Nullable)buttonWithTitle:(NSString * _Nullable)title titleColor:(UIColor * _Nullable)titleColor cornerRadius:(CGFloat)cornerRadius borderWidth:(CGFloat)borderWidth borderColor:(UIColor * _Nullable)borderColor backgroundColor:(UIColor * _Nullable)backgroundColor; | |
| 64 | + | |
| 65 | +/** | |
| 66 | + 创建UIButton,高亮背景,圆角,边框颜色及宽度,文字及其颜色,字号,对齐方式 | |
| 67 | + | |
| 68 | + @param title 文字 | |
| 69 | + @param titleColor 文字颜色 | |
| 70 | + @param labelFontSize 字体字号 | |
| 71 | + @param labelTextAlginment 文字对齐方式 | |
| 72 | + @param cornerRadius 圆角半径 | |
| 73 | + @param borderWidth 边框宽度 | |
| 74 | + @param borderColor 边框颜色 | |
| 75 | + @param backgroundImageHighlight 高亮状态下的背景图片 | |
| 76 | + @return 自定义的UIButton | |
| 77 | + */ | |
| 78 | ++ (UIButton * _Nullable)buttonWithTitle:(NSString * _Nullable)title titleColor:(UIColor * _Nullable)titleColor labelFontSize:(CGFloat)labelFontSize labelTextAlginment:(NSTextAlignment)labelTextAlginment cornerRadius:(CGFloat)cornerRadius borderWidth:(CGFloat)borderWidth borderColor:(UIColor * _Nullable)borderColor backgroundImageHighlight:(UIImage * _Nullable)backgroundImageHighlight; | |
| 79 | + | |
| 80 | +/** | |
| 81 | + 创建UIButton,正常和高亮的背景图片,圆角半径,文字及其颜色,字号 | |
| 82 | + | |
| 83 | + @param title 文字 | |
| 84 | + @param titleColor 文字颜色 | |
| 85 | + @param labelFontSize 字体字号 | |
| 86 | + @param cornerRadius 圆角半径 | |
| 87 | + @param backgroundImageNormal 正常状态下的背景图片 | |
| 88 | + @param backgroundImageHighlight 高亮状态下的背景图片 | |
| 89 | + @return 自定义的UIButton | |
| 90 | + */ | |
| 91 | ++ (UIButton * _Nullable)buttonWithTitle:(NSString * _Nullable)title titleColor:(UIColor * _Nullable)titleColor labelFontSize:(CGFloat)labelFontSize cornerRadius:(CGFloat)cornerRadius backgroundImageNormal:(UIImage * _Nullable)backgroundImageNormal backgroundImageHighlight:(UIImage * _Nullable)backgroundImageHighlight; | |
| 92 | + | |
| 93 | +/** | |
| 94 | + 创建UIButton,正常状态下的图片,圆角半径 | |
| 95 | + | |
| 96 | + @param imageNormal 正常状态下的图片 | |
| 97 | + @param cornerRadius 圆角半径 | |
| 98 | + @return 自定义的UIButton | |
| 99 | + */ | |
| 100 | ++ (UIButton * _Nullable)buttonWithImageNormal:(UIImage * _Nullable)imageNormal cornerRadius:(CGFloat)cornerRadius; | |
| 101 | + | |
| 102 | +/** | |
| 103 | + 创建UIButton,正常状态下的图片 | |
| 104 | + | |
| 105 | + @param imageNormal 正常状态下的图片 | |
| 106 | + @return 自定义的UIButton | |
| 107 | + */ | |
| 108 | ++ (UIButton * _Nullable)buttonWithImageNormal:(UIImage * _Nullable)imageNormal; | |
| 109 | + | |
| 110 | +/** | |
| 111 | + 创建UIButton,正常和选中状态的图片 | |
| 112 | + | |
| 113 | + @param imageNormal 正常状态下的图片 | |
| 114 | + @param imageSelected 选中状态下的图片 | |
| 115 | + @return 自定义的UIButton | |
| 116 | + */ | |
| 117 | ++ (UIButton * _Nullable)buttonWithImageNormal:(UIImage * _Nullable)imageNormal imageSelected:(UIImage * _Nullable)imageSelected; | |
| 118 | + | |
| 119 | +/** | |
| 120 | + 创建UIButton,正常和选中下背景图片 | |
| 121 | + | |
| 122 | + @param backgroundImageNormal 正常状态下的背景图片 | |
| 123 | + @param backgroundImageSelected 选择状态下的背景图片 | |
| 124 | + @return 自定义的UIButton | |
| 125 | + */ | |
| 126 | ++ (UIButton * _Nullable)buttonWithBackgroundImageNormal:(UIImage * _Nullable)backgroundImageNormal backgroundImageSelected:(UIImage * _Nullable)backgroundImageSelected; | |
| 127 | + | |
| 128 | +/** | |
| 129 | + 设置热区 | |
| 130 | + */ | |
| 131 | +@property (nonatomic, assign) UIEdgeInsets touchAreaInsets; | |
| 132 | + | |
| 133 | +/** | |
| 134 | + 扩大点击范围 | |
| 135 | + | |
| 136 | + @param top top | |
| 137 | + @param right right | |
| 138 | + @param bottom bottom | |
| 139 | + @param left left | |
| 140 | + */ | |
| 141 | +- (void)setEnlargeEdgeWithTop:(CGFloat)top right:(CGFloat)right bottom:(CGFloat)bottom left:(CGFloat)left; | |
| 142 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UIColor+CNLiveExtension.h
0 → 100644
| 1 | +// | |
| 2 | +// UIColor+CNLiveExtension.h | |
| 3 | +// CNLiveCommonCategory | |
| 4 | +// | |
| 5 | +// Created by 张旭 on 2018/9/27. | |
| 6 | +// Copyright © 2018年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | +@interface UIColor (CNLiveExtension) | |
| 12 | + | |
| 13 | +- (CGFloat)cnlive_alpha; | |
| 14 | + | |
| 15 | +//十六进制颜色 | |
| 16 | ++ (UIColor *)colorWithHexString:(NSString *)color; | |
| 17 | + | |
| 18 | +//十六进制颜色,alpha | |
| 19 | ++ (UIColor *) colorWithHexString:(NSString *)color andAlpha:(CGFloat )alpha; | |
| 20 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UIColor+TLChat.h
0 → 100644
| 1 | +// | |
| 2 | +// UIColor+TLChat.h | |
| 3 | +// TLChat | |
| 4 | +// | |
| 5 | +// Created by 李伯坤 on 16/1/27. | |
| 6 | +// Copyright © 2016年 李伯坤. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | +@interface UIColor (TLChat) | |
| 12 | + | |
| 13 | +#pragma mark - # 字体 | |
| 14 | ++ (UIColor *)colorTextBlack; | |
| 15 | ++ (UIColor *)colorTextGray; | |
| 16 | ++ (UIColor *)colorTextGray1; | |
| 17 | + | |
| 18 | + | |
| 19 | +#pragma mark - 灰色 | |
| 20 | ++ (UIColor *)colorGrayBG; // 浅灰色默认背景 | |
| 21 | ++ (UIColor *)colorGrayCharcoalBG; // 较深灰色背景(聊天窗口, 朋友圈用) | |
| 22 | ++ (UIColor *)colorGrayLine; | |
| 23 | ++ (UIColor *)colorGrayForChatBar; | |
| 24 | ++ (UIColor *)colorGrayForMoment; | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | +#pragma mark - 绿色 | |
| 29 | ++ (UIColor *)colorGreenDefault; | |
| 30 | ++ (UIColor *)colorGreenHL; | |
| 31 | + | |
| 32 | + | |
| 33 | +#pragma mark - 蓝色 | |
| 34 | ++ (UIColor *)colorBlueMoment; | |
| 35 | + | |
| 36 | + | |
| 37 | +#pragma mark - 黑色 | |
| 38 | ++ (UIColor *)colorBlackForNavBar; | |
| 39 | ++ (UIColor *)colorBlackBG; | |
| 40 | ++ (UIColor *)colorBlackAlphaScannerBG; | |
| 41 | ++ (UIColor *)colorBlackForAddMenu; | |
| 42 | ++ (UIColor *)colorBlackForAddMenuHL; | |
| 43 | + | |
| 44 | + | |
| 45 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UIControl+CNEventInterval.h
0 → 100644
| 1 | +// | |
| 2 | +// UIControl+CNEventInterval.h | |
| 3 | +// CNLiveNetAdd | |
| 4 | +// | |
| 5 | +// Created by 流诗语 on 2018/4/18. | |
| 6 | +// Copyright © 2018年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | +@interface UIControl (CNEventInterval) | |
| 12 | +@property (nonatomic, assign) NSTimeInterval cs_acceptEventInterval; // 重复点击的间隔 | |
| 13 | + | |
| 14 | +@property (nonatomic, assign) NSTimeInterval cs_acceptEventTime; | |
| 15 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UIDevice+CNDevice.h
0 → 100644
| 1 | +// | |
| 2 | +// UIDevice+CNDevice.h | |
| 3 | +// CNLiveNetAdd | |
| 4 | +// | |
| 5 | +// Created by 流诗语 on 2018/4/23. | |
| 6 | +// Copyright © 2018年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | +@interface UIDevice (CNDevice) | |
| 12 | +/** | |
| 13 | + * @interfaceOrientation 输入要强制转屏的方向 | |
| 14 | + */ | |
| 15 | ++ (void)switchNewOrientation:(UIInterfaceOrientation)interfaceOrientation; | |
| 16 | + | |
| 17 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UIImage+Alpha.h
0 → 100755
| 1 | +// UIImage+Alpha.h | |
| 2 | +// Created by Trevor Harmon on 9/20/09. | |
| 3 | +// Free for personal or commercial use, with or without modification. | |
| 4 | +// No warranty is expressed or implied. | |
| 5 | + | |
| 6 | +#import <UIKit/UIKit.h> | |
| 7 | +@interface UIImage (Alpha) | |
| 8 | + | |
| 9 | +- (BOOL)hasAlpha; | |
| 10 | + | |
| 11 | +- (UIImage *)imageWithAlpha; | |
| 12 | + | |
| 13 | +- (UIImage *)transparentBorderImage:(NSUInteger)borderSize; | |
| 14 | + | |
| 15 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UIImage+CNLiveAdd.h
0 → 100644
| 1 | +// | |
| 2 | +// UIImage+CNLiveAdd.h | |
| 3 | +// CNLiveCommonCategory | |
| 4 | +// | |
| 5 | +// Created by 张旭 on 2018/10/12. | |
| 6 | +// Copyright © 2018年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | +NS_ASSUME_NONNULL_BEGIN | |
| 12 | + | |
| 13 | +@interface UIImage (CNLiveAdd) | |
| 14 | + | |
| 15 | + | |
| 16 | +/** | |
| 17 | + 重新设置size | |
| 18 | + | |
| 19 | + @param size 目标size | |
| 20 | + @return 目标size的UIImage对象 | |
| 21 | + */ | |
| 22 | +- (UIImage *)cnlive_imageByResizeToSize:(CGSize)size; | |
| 23 | + | |
| 24 | +//颜色转背景图片 | |
| 25 | +- (UIImage *)imageWithColor:(UIColor *)color; | |
| 26 | +@end | |
| 27 | + | |
| 28 | +NS_ASSUME_NONNULL_END | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UIImage+Common.h
0 → 100644
| 1 | +// | |
| 2 | +// UIImage+Common.h | |
| 3 | +// CommonLibrary | |
| 4 | +// | |
| 5 | +// Created by Alexi on 13-11-6. | |
| 6 | +// Copyright (c) 2013年 ywchen. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | +@interface UIImage (Common) | |
| 12 | + | |
| 13 | +- (UIImage *)fixOrientation; | |
| 14 | + | |
| 15 | +- (UIImage *)thumbnailWithSize:(CGSize)asize; | |
| 16 | + | |
| 17 | +- (UIImage *)rescaleImageToSize:(CGSize)size; | |
| 18 | + | |
| 19 | +- (UIImage *)cropImageToRect:(CGRect)cropRect; | |
| 20 | + | |
| 21 | +- (CGSize)calculateNewSizeForCroppingBox:(CGSize)croppingBox; | |
| 22 | + | |
| 23 | +- (UIImage *)cropCenterAndScaleImageToSize:(CGSize)cropSize; | |
| 24 | + | |
| 25 | +- (UIImage *)cropToSquareImage; | |
| 26 | + | |
| 27 | ++ (UIImage *)imageWithColor:(UIColor *)color; | |
| 28 | + | |
| 29 | ++ (UIImage *)imageWithColor:(UIColor *)color size:(CGSize)size; | |
| 30 | + | |
| 31 | +- (UIImage *)croppedImage:(CGRect)bounds; | |
| 32 | + | |
| 33 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UIImage+ImageEffect.h
0 → 100644
| 1 | +// | |
| 2 | +// UIImage+ImageEffect.h | |
| 3 | +// CommonLibrary | |
| 4 | +// | |
| 5 | +// Created by AlexiChen on 15/12/24. | |
| 6 | +// Copyright © 2015年 AlexiChen. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | +@interface UIImage (ImageEffect) | |
| 12 | + | |
| 13 | +- (UIImage *)applyLightEffect; | |
| 14 | +- (UIImage *)applyExtraLightEffect; | |
| 15 | +- (UIImage *)applyDarkEffect; | |
| 16 | +- (UIImage *)applyTintEffectWithColor:(UIColor *)tintColor; | |
| 17 | + | |
| 18 | +- (UIImage *)blurWithRadius:(CGFloat)blurRadius tintColor:(UIColor *)tintColor deltaFactor:(CGFloat)deltaFactor maskImage:(UIImage *)maskImage; | |
| 19 | + | |
| 20 | +@end | |
| 21 | + | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UIImage+Luban_iOS_Extension_h.h
0 → 100755
| 1 | +// | |
| 2 | +// UIImage+Luban_iOS_Extension_h.h | |
| 3 | +// Luban-iOS | |
| 4 | +// | |
| 5 | +// Created by guo on 2017/7/20. | |
| 6 | +// Copyright © 2017年 guo. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | +@interface UIImage (Luban_iOS_Extension_h) | |
| 12 | + | |
| 13 | ++ (NSData *)lubanCompressImage:(UIImage *)image;//压缩图片 | |
| 14 | ++ (NSData *)lubanCompressImage:(UIImage *)image withMask:(NSString *)maskName;//水印 | |
| 15 | ++ (NSData *)lubanCompressImage:(UIImage *)image withCustomImage:(NSString *)imageName;//自定义名字压缩 | |
| 16 | + | |
| 17 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UIImage+SGImageSize.h
0 → 100755
| 1 | +// | |
| 2 | +// 如遇到问题或有更好方案,请通过以下方式进行联系 | |
| 3 | +// QQ群:429899752 | |
| 4 | +// Email:kingsic@126.com | |
| 5 | +// GitHub:https://github.com/kingsic/SGQRCode | |
| 6 | +// | |
| 7 | +// UIImage+SGImageSize.h | |
| 8 | +// SGQRCodeExample | |
| 9 | +// | |
| 10 | +// Created by kingsic on 17/3/27. | |
| 11 | +// Copyright © 2017年 kingsic. All rights reserved. | |
| 12 | +// | |
| 13 | + | |
| 14 | +#import <UIKit/UIKit.h> | |
| 15 | + | |
| 16 | +@interface UIImage (SGImageSize) | |
| 17 | +/** 返回一张不超过屏幕尺寸的 image */ | |
| 18 | ++ (UIImage *)SG_imageSizeWithScreenImage:(UIImage *)image; | |
| 19 | + | |
| 20 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UIImage+ScaleImageSize.h
0 → 100644
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UIImage+TintColor.h
0 → 100644
| 1 | +// | |
| 2 | +// UIImage+TintColor.h | |
| 3 | +// TintColor | |
| 4 | +// | |
| 5 | +// Created by Alexi on 13-9-23. | |
| 6 | +// Copyright (c) 2013年 ywchen. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | +@interface UIImage (TintColor) | |
| 12 | + | |
| 13 | +// tint只对里面的图案作更改颜色操作 | |
| 14 | +- (UIImage *)imageWithTintColor:(UIColor *)tintColor; | |
| 15 | +- (UIImage *)imageWithTintColor:(UIColor *)tintColor blendMode:(CGBlendMode)blendMode; | |
| 16 | +- (UIImage *)imageWithGradientTintColor:(UIColor *)tintColor; | |
| 17 | + | |
| 18 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UIImage+ZXExtension.h
0 → 100755
| 1 | +// | |
| 2 | +// UIImage+ZXExtension.h | |
| 3 | +// | |
| 4 | +// | |
| 5 | +// Created by mac on 16/8/31. | |
| 6 | +// Copyright © 2016年 mac. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | +@interface UIImage (ZXExtension) | |
| 12 | +@property (nonatomic, strong)NSData *imageData; | |
| 13 | +@property (nonatomic, copy)NSString *isGif; | |
| 14 | +/** | |
| 15 | + * 返回一张圆形图片 | |
| 16 | + */ | |
| 17 | +- (instancetype)zx_circleImage; | |
| 18 | + | |
| 19 | +/** | |
| 20 | + * 返回一张圆形图片 | |
| 21 | + */ | |
| 22 | ++ (instancetype)zx_circleImageNamed:(NSString *)name; | |
| 23 | + | |
| 24 | +/** | |
| 25 | + 生成指定颜色,大小,圆角的UIImage对象 | |
| 26 | + | |
| 27 | + @param color 颜色 | |
| 28 | + @param size 大小 | |
| 29 | + @param cornerRadius 圆角 | |
| 30 | + @return 指定UIImage对象 | |
| 31 | + */ | |
| 32 | ++ (UIImage *)cnlive_imageWithColor:(UIColor *)color size:(CGSize)size cornerRadius:(CGFloat)cornerRadius; | |
| 33 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UIImage+zipData.h
0 → 100644
| 1 | +// | |
| 2 | +// UIImage+zipData.h | |
| 3 | +// Luban-iOS | |
| 4 | +// | |
| 5 | +// Created by 梁星国 on 2018/8/24. | |
| 6 | +// Copyright © 2018年 guo. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | +typedef NS_ENUM(NSUInteger, AppPhototLimitType) { | |
| 12 | + AppPhototLimitTypeFriendsCircle = 0,//朋友圈图片限制20M | |
| 13 | + AppPhototLimitTypeTarentoComment = 1,//达人评论图片限制10M | |
| 14 | + AppPhototLimitTypeSweepCode = 2,//扫码图片限制10M | |
| 15 | + AppPhototLimitTypeChat = 3,//聊天图片限制20M | |
| 16 | +}; | |
| 17 | + | |
| 18 | +@interface UIImage (zipData) | |
| 19 | + | |
| 20 | + | |
| 21 | +/** | |
| 22 | + 以1280作参照图像尺寸压缩 | |
| 23 | + | |
| 24 | + @param sourceImage 图片 | |
| 25 | + @return 压缩图片 | |
| 26 | + */ | |
| 27 | ++(UIImage *)zipScaleWithImage:(UIImage *)sourceImage; | |
| 28 | + | |
| 29 | +/** | |
| 30 | + 以1080作参照图像尺寸压缩 | |
| 31 | + | |
| 32 | + @param sourceImage 图片 | |
| 33 | + @return 压缩图片 | |
| 34 | + */ | |
| 35 | ++(UIImage *)zipScale_1080_WithImage:(UIImage *)sourceImage; | |
| 36 | + | |
| 37 | +/** | |
| 38 | + 自定义参照尺寸压缩 | |
| 39 | + | |
| 40 | + @param sourceImage 图片 | |
| 41 | + @param accordingSize 参照尺寸 | |
| 42 | + @return 压缩图片 | |
| 43 | + */ | |
| 44 | ++(UIImage *)zipScaleWithImage:(UIImage *)sourceImage accordingSize:(NSInteger )accordingSize; | |
| 45 | + | |
| 46 | +/** | |
| 47 | + 普通图限制20M,极限设置19M,小于100KB不压缩 | |
| 48 | + @param sourceImage 图片 | |
| 49 | + @return 返回压缩图片 | |
| 50 | + */ | |
| 51 | ++(NSData *)zipNSDataWithImage:(UIImage *)sourceImage; | |
| 52 | + | |
| 53 | +/** | |
| 54 | + 原图限制20M,极限设置19M,小于19M不压缩 | |
| 55 | + 普通图限制20M,极限设置19M,小于100KB不压缩 | |
| 56 | + @param sourceImage 图片 | |
| 57 | + @param isOriginal 是否原图 | |
| 58 | + @return 返回压缩图片 | |
| 59 | + */ | |
| 60 | ++(NSData *)zipNSDataWithImage:(UIImage *)sourceImage isOriginal:(BOOL)isOriginal; | |
| 61 | + | |
| 62 | +/** | |
| 63 | + 以1280作参照图像尺寸压缩,质量压缩 | |
| 64 | + | |
| 65 | + @param sourceImage 图片 | |
| 66 | + @return 返回压缩结果 | |
| 67 | + */ | |
| 68 | ++(NSData *)zipNSDataAndScaleWithImage:(UIImage *)sourceImage; | |
| 69 | + | |
| 70 | +/** | |
| 71 | + 以1080作参照图像尺寸压缩,质量压缩 | |
| 72 | + | |
| 73 | + @param sourceImage 图片 | |
| 74 | + @return 返回压缩结果 | |
| 75 | + */ | |
| 76 | ++(NSData *)zip_1080_NSDataAndScaleWithImage:(UIImage *)sourceImage; | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UIImageView+InitMethod.h
0 → 100644
| 1 | +// | |
| 2 | +// UIImageView+InitMethod.h | |
| 3 | +// CommonLibrary | |
| 4 | +// | |
| 5 | +// Created by Alexi on 14-7-21. | |
| 6 | +// Copyright (c) 2014年 Alexi Chen. All rights reserved. | |
| 7 | +// | |
| 8 | +#import <UIKit/UIKit.h> | |
| 9 | + | |
| 10 | +@interface UIImageView (InitMethod) | |
| 11 | + | |
| 12 | ++ (instancetype)imageViewWithColor:(UIColor *)color; | |
| 13 | + | |
| 14 | ++ (instancetype)imageViewWithColor:(UIColor *)color size:(CGSize)size; | |
| 15 | + | |
| 16 | ++ (instancetype)imageViewWithImage:(UIImage *)image; | |
| 17 | + | |
| 18 | +@end | |
| 19 | + | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UIImageView+ZXExtension.h
0 → 100755
| 1 | +// | |
| 2 | +// UIImageView+ZXExtension.h | |
| 3 | +// | |
| 4 | +// | |
| 5 | +// Created by mac on 16/8/31. | |
| 6 | +// Copyright © 2016年 mac. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | +@interface UIImageView (ZXExtension) | |
| 12 | +- (void)zx_setHeader:(NSString *)url; | |
| 13 | + | |
| 14 | +- (void)zx_setRectHeader:(NSString *)url; | |
| 15 | + | |
| 16 | +//获取图片某一点的颜色 ,设置完图片后获取 | |
| 17 | +- (UIColor *)colorAtPixel:(CGPoint)point; | |
| 18 | + | |
| 19 | +- (UIColor *)getPixelColorAtLocation:(CGPoint)point; | |
| 20 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UILabel+Common.h
0 → 100644
| 1 | +// | |
| 2 | +// UILabel+UILabel_Common.h | |
| 3 | +// CommonLibrary | |
| 4 | +// | |
| 5 | +// Created by AlexiChen on 14-1-18. | |
| 6 | +// Copyright (c) 2014年 CommonLibrary. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | +@interface UILabel (Common) | |
| 12 | + | |
| 13 | +// 已知区域重新调整 | |
| 14 | +- (CGSize)contentSize; | |
| 15 | + | |
| 16 | +// 不知区域,通过其设置区域 | |
| 17 | +- (CGSize)textSizeIn:(CGSize)size; | |
| 18 | + | |
| 19 | +@end | |
| 20 | + | |
| 21 | + | |
| 22 | +@interface InsetLabel : UILabel | |
| 23 | + | |
| 24 | +@property (nonatomic, assign) UIEdgeInsets contentInset; | |
| 25 | + | |
| 26 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UILabel+InitMethod.h
0 → 100644
| 1 | +// | |
| 2 | +// UILabel+InitMethod.h | |
| 3 | +// CommonLibrary | |
| 4 | +// | |
| 5 | +// Created by Alexi on 14-7-21. | |
| 6 | +// Copyright (c) 2014年 Alexi Chen. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | +@interface UILabel (InitMethod) | |
| 12 | + | |
| 13 | ++ (instancetype)label; | |
| 14 | + | |
| 15 | ++ (instancetype)labelWith:(NSString *)text; | |
| 16 | + | |
| 17 | ++ (instancetype)labelWith:(NSString *)text textColor:(UIColor *)color; | |
| 18 | + | |
| 19 | ++ (instancetype)labelWith:(NSString *)text textColor:(UIColor *)color backgroundColor:(UIColor *)bgColor; | |
| 20 | + | |
| 21 | ++ (instancetype)centerlabelWith:(NSString *)text; | |
| 22 | + | |
| 23 | ++ (instancetype)labelWith:(NSString *)text font:(CGFloat)size; | |
| 24 | + | |
| 25 | ++ (instancetype)labelWith:(NSString *)text font:(CGFloat)size textColor:(UIColor *)textColor; | |
| 26 | + | |
| 27 | ++ (instancetype)labelWith:(NSString *)text boldFont:(CGFloat)size; | |
| 28 | + | |
| 29 | ++ (instancetype)centerlabelWith:(NSString *)text font:(CGFloat)size; | |
| 30 | + | |
| 31 | ++ (instancetype)centerlabelWith:(NSString *)text font:(CGFloat)size textColor:(UIColor *)textColor; | |
| 32 | + | |
| 33 | ++ (instancetype)centerlabelWith:(NSString *)text boldFont:(CGFloat)size; | |
| 34 | + | |
| 35 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UINavigationBar+NavigationBarBackground.h
0 → 100644
| 1 | +// | |
| 2 | +// UINavigationBar+Other.h | |
| 3 | +// MZTimerLabelDemo | |
| 4 | +// | |
| 5 | +// Created by HEYANG on 16/3/6. | |
| 6 | +// Copyright © 2016年 HEYANG. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | +@interface UINavigationBar (NavigationBarBackground) | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * 设置NavigationBar的私有属性backgroundView的背景颜色 | |
| 15 | + * | |
| 16 | + */ | |
| 17 | +- (void)hy_setBackgroundViewWithColor:(UIColor *)backgroundColor; | |
| 18 | + | |
| 19 | + | |
| 20 | +/** | |
| 21 | + * 设置NavigationBar的背景透明度 | |
| 22 | + * */ | |
| 23 | +- (void)hy_setBackgroundViewWithAlpha:(CGFloat)alpha; | |
| 24 | + | |
| 25 | +/** | |
| 26 | + * 重设NavigationBar的背景样式为默认的样式 | |
| 27 | + */ | |
| 28 | +- (void)hy_resetBackgroundDefaultStyle; | |
| 29 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UIScrollView+Extensions.h
0 → 100644
| 1 | +// | |
| 2 | +// UIScrollView+Extensions.h | |
| 3 | +// TLKit | |
| 4 | +// | |
| 5 | +// Created by 李伯坤 on 2017/8/27. | |
| 6 | +// Copyright © 2017年 libokun. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | +@interface UIScrollView (Extensions) | |
| 12 | + | |
| 13 | +#pragma mark - # ContentOffset | |
| 14 | +@property (nonatomic, assign) CGFloat offsetX; | |
| 15 | +- (void)setOffsetX:(CGFloat)offsetX animated:(BOOL)animated; | |
| 16 | +@property (nonatomic, assign) CGFloat offsetY; | |
| 17 | +- (void)setOffsetY:(CGFloat)offsetY animated:(BOOL)animated; | |
| 18 | + | |
| 19 | + | |
| 20 | +#pragma mark - # ContentSize | |
| 21 | +@property (nonatomic, assign) CGFloat contentWidth; | |
| 22 | +@property (nonatomic, assign) CGFloat contentHeight; | |
| 23 | + | |
| 24 | + | |
| 25 | +#pragma mark - # Scroll | |
| 26 | +/** | |
| 27 | + * 滚动到最顶端 | |
| 28 | + */ | |
| 29 | +- (void)scrollToTopWithAnimation:(BOOL)animation; | |
| 30 | +/** | |
| 31 | + * 滚动到最底端 | |
| 32 | + */ | |
| 33 | +- (void)scrollToBottomWithAnimation:(BOOL)animation; | |
| 34 | +/** | |
| 35 | + * 滚动到最左端 | |
| 36 | + */ | |
| 37 | +- (void)scrollToLeftWithAnimation:(BOOL)animation; | |
| 38 | +/** | |
| 39 | + * 滚动到最右端 | |
| 40 | + */ | |
| 41 | +- (void)scrollToRightWithAnimation:(BOOL)animation; | |
| 42 | + | |
| 43 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UIScrollView+Pages.h
0 → 100644
| 1 | +// | |
| 2 | +// UIScrollView+Pages.h | |
| 3 | +// TLKit | |
| 4 | +// | |
| 5 | +// Created by 李伯坤 on 2017/8/27. | |
| 6 | +// Copyright © 2017年 libokun. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | +@interface UIScrollView (Pages) | |
| 12 | + | |
| 13 | +#pragma mark - # 横向分页 | |
| 14 | +@property (nonatomic, assign, readonly) NSInteger numberOfPageX; | |
| 15 | +@property (nonatomic, assign) NSInteger pageX; | |
| 16 | +- (void)setPageX:(CGFloat)page animated:(BOOL)animated; | |
| 17 | + | |
| 18 | +#pragma mark - # 纵向分页 | |
| 19 | +@property (nonatomic, assign, readonly) NSInteger numberOfPageY; | |
| 20 | +@property (nonatomic, assign) NSInteger pageY; | |
| 21 | +- (void)setPageY:(CGFloat)page animated:(BOOL)animated; | |
| 22 | + | |
| 23 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UITableView+Hit.h
0 → 100644
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UITextField+ZXExtension.h
0 → 100755
| 1 | +// | |
| 2 | +// UITextField+ZXExtension.h | |
| 3 | +// | |
| 4 | +// | |
| 5 | +// Created by mac on 16/8/25. | |
| 6 | +// Copyright © 2016年 mac. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | +@interface UITextField (ZXExtension) | |
| 12 | +//占位文字颜色 | |
| 13 | +@property (nonatomic ,strong) UIColor *zx_placeholderColor; | |
| 14 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UIView+CNGradienLayer.h
0 → 100644
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UIView+CaptureImage.h
0 → 100755
| 1 | +// | |
| 2 | +// UIView+CaptureImage.h | |
| 3 | +// CommonLibrary | |
| 4 | +// | |
| 5 | +// Created by AlexiChen on 15/12/5. | |
| 6 | +// Copyright © 2015年 AlexiChen. All rights reserved. | |
| 7 | +// | |
| 8 | +#if kSupportADTransition | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | + | |
| 12 | +@interface UIView (CaptureImage) | |
| 13 | + | |
| 14 | + | |
| 15 | +- (UIImage *)captureImage; | |
| 16 | + | |
| 17 | +- (UIImage *)captureImageAtRect:(CGRect)rect; | |
| 18 | + | |
| 19 | +@end | |
| 20 | +#endif | |
| 0 | 21 | \ No newline at end of file | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UIView+CustomAutoLayout.h
0 → 100644
| 1 | +// | |
| 2 | +// UIView+CustomAutoLayout.h | |
| 3 | +// CommonLibrary | |
| 4 | +// | |
| 5 | +// Created by Alexi on 13-11-20. | |
| 6 | +// Copyright (c) 2013年 ywchen. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | +// 使用装饰模式进行自动布局处理 | |
| 12 | + | |
| 13 | +#ifdef DEBUG | |
| 14 | + | |
| 15 | +#define IsArgInvalid(curView, brotherView) NSAssert((self.superview == brotherView.superview) && !(CGRectEqualToRect(brotherView.frame, CGRectZero)), @"UIView (CustomAutoLayout)参数出错") | |
| 16 | +#define IsSuperViewInvalid(curView) NSAssert((self.superview != nil), @"UIView (CustomAutoLayout)父控件没有设置参数出错") | |
| 17 | + | |
| 18 | +#else | |
| 19 | + | |
| 20 | +#define IsArgInvalid(curView, brotherView) | |
| 21 | +#define IsSuperViewInvalid(curView) | |
| 22 | + | |
| 23 | +#endif | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | +@interface UIView (CustomAutoLayout) | |
| 28 | + | |
| 29 | + | |
| 30 | +- (UIView *)sameWith:(UIView *)brotherView; | |
| 31 | + | |
| 32 | +// 同一控件内两子之空间之间的相对位置 | |
| 33 | +// margin 之间的空隙 | |
| 34 | +// brotherView.superView与self.superView相同 | |
| 35 | +// brotherView必须要先设置了frame | |
| 36 | + | |
| 37 | +// 会影响origin的位置,会影响其高度 | |
| 38 | +- (UIView *)layoutAbove:(UIView *)brotherView; | |
| 39 | +- (UIView *)layoutAbove:(UIView *)brotherView margin:(CGFloat)margin; | |
| 40 | + | |
| 41 | +- (UIView *)layoutBelow:(UIView *)brotherView; | |
| 42 | +- (UIView *)layoutBelow:(UIView *)brotherView margin:(CGFloat)margin; | |
| 43 | + | |
| 44 | +// 会影响origin的位置,会影响其宽度 | |
| 45 | +- (UIView *)layoutToLeftOf:(UIView *)brotherView; | |
| 46 | +- (UIView *)layoutToLeftOf:(UIView *)brotherView margin:(CGFloat)margin; | |
| 47 | + | |
| 48 | +- (UIView *)layoutToRightOf:(UIView *)brotherView; | |
| 49 | +- (UIView *)layoutToRightOf:(UIView *)brotherView margin:(CGFloat)margin; | |
| 50 | + | |
| 51 | + | |
| 52 | +// 填充式布局 | |
| 53 | +- (UIView *)scaleToAboveOf:(UIView *)brotherView; | |
| 54 | +- (UIView *)scaleToAboveOf:(UIView *)brotherView margin:(CGFloat)margin; | |
| 55 | + | |
| 56 | +- (UIView *)scaleToBelowOf:(UIView *)brotherView; | |
| 57 | +- (UIView *)scaleToBelowOf:(UIView *)brotherView margin:(CGFloat)margin; | |
| 58 | + | |
| 59 | +- (UIView *)scaleToLeftOf:(UIView *)brotherView; | |
| 60 | +- (UIView *)scaleToLeftOf:(UIView *)brotherView margin:(CGFloat)margin; | |
| 61 | + | |
| 62 | +- (UIView *)scaleToRightOf:(UIView *)brotherView; | |
| 63 | +- (UIView *)scaleToRightOf:(UIView *)brotherView margin:(CGFloat)margin; | |
| 64 | + | |
| 65 | + | |
| 66 | +// 相对父控件进行填充 | |
| 67 | +- (UIView *)scaleParent; | |
| 68 | +- (UIView *)scaleToParentTop; | |
| 69 | +- (UIView *)scaleToParentTopWithMargin:(CGFloat)margin; | |
| 70 | + | |
| 71 | +- (UIView *)scaleToParentBottom; | |
| 72 | +- (UIView *)scaleToParentBottomWithMargin:(CGFloat)margin; | |
| 73 | + | |
| 74 | +- (UIView *)scaleToParentLeft; | |
| 75 | +- (UIView *)scaleToParentLeftWithMargin:(CGFloat)margin; | |
| 76 | + | |
| 77 | +- (UIView *)scaleToParentRight; | |
| 78 | +- (UIView *)scaleToParentRightWithMargin:(CGFloat)margin; | |
| 79 | + | |
| 80 | + | |
| 81 | +// 同一控件内两子之空间之间的对齐关系 | |
| 82 | +// 会影响origin的位置, 不影响大小 | |
| 83 | +- (UIView *)alignTop:(UIView *)brotherView; | |
| 84 | +- (UIView *)alignTop:(UIView *)brotherView margin:(CGFloat)margin; | |
| 85 | + | |
| 86 | +- (UIView *)alignBottom:(UIView *)brotherView; | |
| 87 | +- (UIView *)alignBottom:(UIView *)brotherView margin:(CGFloat)margin; | |
| 88 | + | |
| 89 | +- (UIView *)alignLeft:(UIView *)brotherView; | |
| 90 | +- (UIView *)alignLeft:(UIView *)brotherView margin:(CGFloat)margin; | |
| 91 | + | |
| 92 | +- (UIView *)alignRight:(UIView *)brotherView; | |
| 93 | +- (UIView *)alignRight:(UIView *)brotherView margin:(CGFloat)margin; | |
| 94 | + | |
| 95 | + | |
| 96 | +- (UIView *)alignHorizontalCenterOf:(UIView *)brotherView; | |
| 97 | +- (UIView *)alignVerticalCenterOf:(UIView *)brotherView; | |
| 98 | +- (UIView *)alignCenterOf:(UIView *)brotherView; | |
| 99 | + | |
| 100 | +- (UIView *)moveCenterTo:(CGPoint)center; | |
| 101 | +- (UIView *)move:(CGPoint)vec; | |
| 102 | + | |
| 103 | + | |
| 104 | +// 与父控件对齐的关系 | |
| 105 | +// 只影响其坐标位置,不影响其大小 | |
| 106 | +- (UIView *)alignParentTop; | |
| 107 | +- (UIView *)alignParentBottom; | |
| 108 | +- (UIView *)alignParentLeft; | |
| 109 | +- (UIView *)alignParentRight; | |
| 110 | + | |
| 111 | +- (UIView *)alignParentCenter; | |
| 112 | +- (UIView *)alignParentCenter:(CGPoint)margin; | |
| 113 | + | |
| 114 | +- (UIView *)alignParentTopWithMargin:(CGFloat)margin; | |
| 115 | +- (UIView *)alignParentBottomWithMargin:(CGFloat)margin; | |
| 116 | +- (UIView *)alignParentLeftWithMargin:(CGFloat)margin; | |
| 117 | +- (UIView *)alignParentRightWithMargin:(CGFloat)margin; | |
| 118 | + | |
| 119 | +// 与父控件的边距 | |
| 120 | +// 只影响其坐标位置,影响其大小 | |
| 121 | +- (UIView *)marginParetnTop:(CGFloat)top bottom:(CGFloat)bottom left:(CGFloat)left rigth:(CGFloat)right; | |
| 122 | +- (UIView *)marginParentWithEdgeInsets:(UIEdgeInsets)inset; | |
| 123 | +- (UIView *)marginParetn:(CGFloat)margin; | |
| 124 | +- (UIView *)marginParetnHorizontal:(CGFloat)margin; | |
| 125 | +- (UIView *)marginParetnVertical:(CGFloat)margin; | |
| 126 | +- (UIView *)marginParentTop:(CGFloat)margin; | |
| 127 | +- (UIView *)marginParentBottom:(CGFloat)margin; | |
| 128 | +- (UIView *)marginParentLeft:(CGFloat)margin; | |
| 129 | +- (UIView *)marginParentRight:(CGFloat)margin; | |
| 130 | + | |
| 131 | + | |
| 132 | +// 控件在父控控件中的位置 | |
| 133 | +// 水平居中 | |
| 134 | +// 只影响其坐标位置,不影响其大小 | |
| 135 | +- (UIView *)layoutParentHorizontalCenter; | |
| 136 | +// 垂直居中 | |
| 137 | +- (UIView *)layoutParentVerticalCenter; | |
| 138 | +// 居中 | |
| 139 | +- (UIView *)layoutParentCenter; | |
| 140 | + | |
| 141 | + | |
| 142 | +// 与其他控件的大小关系 | |
| 143 | +// 影响其大小 | |
| 144 | +- (UIView *)widthEqualTo:(UIView *)brotherView; | |
| 145 | +- (UIView *)heigthEqualTo:(UIView *)brotherView; | |
| 146 | +- (UIView *)sizeEqualTo:(UIView *)brotherView; | |
| 147 | +- (UIView *)sizeWith:(CGSize)size; | |
| 148 | +- (UIView *)setWidth:(CGFloat)width; | |
| 149 | +- (UIView *)setHeight:(CGFloat)height; | |
| 150 | + | |
| 151 | +- (UIView *)shrink:(CGSize)size; | |
| 152 | +- (UIView *)shrinkHorizontal:(CGFloat)margin; | |
| 153 | +- (UIView *)shrinkVertical:(CGFloat)margin; | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | +- (UIView *)alignViews:(NSArray *)array isSubView:(BOOL)isSub padding:(CGFloat)padding margin:(CGFloat)margin horizontal:(BOOL)ishorizontal inRect:(CGRect)rect; | |
| 158 | +// views里面的View都是按UI的指定顺序放好的 | |
| 159 | +- (UIView *)alignSubviews:(NSArray *)views horizontallyWithPadding:(CGFloat)padding margin:(CGFloat)margin inRect:(CGRect)rect; | |
| 160 | +- (UIView *)alignSubviews:(NSArray *)views verticallyWithPadding:(CGFloat)padding margin:(CGFloat)margin inRect:(CGRect)rect; | |
| 161 | + | |
| 162 | +- (UIView *)alignSubviewsHorizontallyWithPadding:(CGFloat)padding margin:(CGFloat)margin; | |
| 163 | +- (UIView *)alignSubviewsVerticallyWithPadding:(CGFloat)padding margin:(CGFloat)margin; | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | +// 使views以Grid方式均匀显示 | |
| 168 | +- (UIView *)gridViews:(NSArray *)views inColumn:(NSInteger)column size:(CGSize)cellSize margin:(CGSize)margin inRect:(CGRect)rect; | |
| 169 | + | |
| 170 | + | |
| 171 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UIView+Effect.h
0 → 100644
| 1 | +// | |
| 2 | +// UIView+Effect.h | |
| 3 | +// CommonLibrary | |
| 4 | +// | |
| 5 | +// Created by AlexiChen on 15/12/24. | |
| 6 | +// Copyright © 2015年 AlexiChen. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | +@interface UIView (Effect) | |
| 12 | + | |
| 13 | +- (void)blurWithColor:(UIColor *)color; | |
| 14 | + | |
| 15 | +// 底层自动blur image | |
| 16 | +- (void)blurWithImage:(UIImage *)image; | |
| 17 | + | |
| 18 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UIView+Glow.h
0 → 100644
| 1 | +// | |
| 2 | +// UIView+Glow.h | |
| 3 | +// | |
| 4 | +// | |
| 5 | +// Created by James on 11/4/14. | |
| 6 | +// Copyright (c) 2014 James. All rights reserved. | |
| 7 | +// | |
| 8 | +#import <UIKit/UIKit.h> | |
| 9 | + | |
| 10 | +@interface UIView (Glow) | |
| 11 | + | |
| 12 | +@property (nonatomic, readonly) UIView *glowView; | |
| 13 | + | |
| 14 | + | |
| 15 | +- (void) glowOnce; | |
| 16 | + | |
| 17 | +- (void) glowOnceAtLocation:(CGPoint)point inView:(UIView *)view; | |
| 18 | + | |
| 19 | +- (void) startGlowing; | |
| 20 | + | |
| 21 | +- (void) startGlowingWithColor:(UIColor *)color intensity:(CGFloat)intensity; | |
| 22 | + | |
| 23 | +- (void) startGlowingWithColor:(UIColor*)color fromIntensity:(CGFloat)fromIntensity toIntensity:(CGFloat)toIntensity repeat:(BOOL)repeat; | |
| 24 | + | |
| 25 | +- (void) startGlowingWithColor:(UIColor*)color fromIntensity:(CGFloat)fromIntensity toIntensity:(CGFloat)toIntensity repeat:(BOOL)repeat duration:(CGFloat)dur; | |
| 26 | + | |
| 27 | +- (void) stopGlowing; | |
| 28 | + | |
| 29 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UIView+Layout.h
0 → 100644
| 1 | +// | |
| 2 | +// UIView+Layout.h | |
| 3 | +// CommonLibrary | |
| 4 | +// | |
| 5 | +// Created by Alexi Chen on 2/28/13. | |
| 6 | +// Copyright (c) 2013 AlexiChen. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | +@interface UIView (Layout) | |
| 12 | + | |
| 13 | +// 添加子控件 | |
| 14 | +- (void)addOwnViews; | |
| 15 | + | |
| 16 | +// 配置子控件参数 | |
| 17 | +- (void)configOwnViews; | |
| 18 | + | |
| 19 | +//- (void)configWith:(NSMutableDictionary *)jsonDic; | |
| 20 | + | |
| 21 | +// isAutoLayoutr返回YES时,使用此方法进行布局 | |
| 22 | +- (void)autoLayoutSubViews; | |
| 23 | + | |
| 24 | +// 是否使用自动布局 | |
| 25 | +- (BOOL)isAutoLayout; | |
| 26 | + | |
| 27 | +// 外部通过此功能进行设置 | |
| 28 | +// 只在布局时使用 | |
| 29 | +- (void)setFrameAndLayout:(CGRect)rect; | |
| 30 | + | |
| 31 | +// 对于一些自定义的UIView,在设置Frame后,如需要重新调整局的话 | |
| 32 | +// 作为所以控修改其自身内部子控件的入口 | |
| 33 | +// 所有的自定义View最好不要从initWithFrams里面进行设置其子View的frame, | |
| 34 | +// 统一在些处进行设置 | |
| 35 | +- (void)relayoutFrameOfSubViews; | |
| 36 | + | |
| 37 | +- (void)addBottomLine:(CGRect)rect; | |
| 38 | + | |
| 39 | +- (void)addBottomLine:(UIColor *)color inRect:(CGRect)rect; | |
| 40 | + | |
| 41 | +@end | |
| 42 | + | |
| 43 | +@interface UIView (ShakeAnimation) | |
| 44 | + | |
| 45 | +// 左右shake | |
| 46 | +- (void)shake; | |
| 47 | + | |
| 48 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UIView+ModifyFrame.h
0 → 100644
| 1 | +// | |
| 2 | +// UIView+ModifyFrame.h | |
| 3 | +// CommonLibrary | |
| 4 | +// | |
| 5 | +// Created by Alexi on 14-2-21. | |
| 6 | +// Copyright (c) 2014年 CommonLibrary. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | + | |
| 10 | +#import <UIKit/UIKit.h> | |
| 11 | + | |
| 12 | +@interface UIView (ModifyFrame) | |
| 13 | + | |
| 14 | +@property float x; | |
| 15 | +@property float y; | |
| 16 | +@property CGPoint origin; | |
| 17 | +@property float width; | |
| 18 | +@property float height; | |
| 19 | + | |
| 20 | +@property CGSize boundsSize; | |
| 21 | + | |
| 22 | +- (CGPoint)originRelativeToWindow; | |
| 23 | +- (CGPoint)centerRelativeToWindow; | |
| 24 | + | |
| 25 | +@end | |
| 26 | + | |
| 27 | +@interface UIViewController (ModifyFrame) | |
| 28 | + | |
| 29 | +@property float x; | |
| 30 | +@property float y; | |
| 31 | +@property float width; | |
| 32 | +@property float height; | |
| 33 | +@property CGSize boundsSize; | |
| 34 | + | |
| 35 | + | |
| 36 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UIView+RelativeCoordinate.h
0 → 100644
| 1 | +// | |
| 2 | +// UIView+RelativeCoordinate.h | |
| 3 | +// CommonLibrary | |
| 4 | +// | |
| 5 | +// Created by Alexi on 5/21/14. | |
| 6 | +// Copyright (c) 2014 Alexi. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | + | |
| 12 | +@interface UIView (RelativeCoordinate) | |
| 13 | + | |
| 14 | +- (BOOL)isSubContentOf:(UIView *)aSuperView; | |
| 15 | + | |
| 16 | +- (CGRect)relativePositionTo:(UIView *)aSuperView; | |
| 17 | + | |
| 18 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UIViewController+ChildViewController.h
0 → 100644
| 1 | +// | |
| 2 | +// UIViewController+ChildViewController.h | |
| 3 | +// CommonLibrary | |
| 4 | +// | |
| 5 | +// Created by Alexi on 14-2-24. | |
| 6 | +// Copyright (c) 2014年 CommonLibrary. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | +// 还需要调试这一块的代码 | |
| 12 | + | |
| 13 | + | |
| 14 | +@interface UIViewController (ChildViewController) | |
| 15 | + | |
| 16 | + | |
| 17 | +- (void)addChild:(UIViewController *)vc; | |
| 18 | + | |
| 19 | +- (void)addChild:(UIViewController *)vc animation:(void (^)(void))inAnimation; | |
| 20 | + | |
| 21 | +- (void)addChild:(UIViewController *)vc inRect:(CGRect)rect; | |
| 22 | + | |
| 23 | +- (void)addChild:(UIViewController *)vc inRect:(CGRect)rect animation:(void (^)(void))inAnimation; | |
| 24 | + | |
| 25 | +- (void)addChild:(UIViewController *)vc container:(UIView *)view; | |
| 26 | + | |
| 27 | +- (void)addChild:(UIViewController *)vc container:(UIView *)view inRect:(CGRect)rect; | |
| 28 | + | |
| 29 | +- (void)addChild:(UIViewController *)vc container:(UIView *)view inRect:(CGRect)rect animation:(void (^)(void))inAnimation; | |
| 30 | + | |
| 31 | +- (void)removeChild:(UIViewController *)vc; | |
| 32 | + | |
| 33 | +- (void)removeChild:(UIViewController *)vc animation:(void (^)(void))outAnimation; | |
| 34 | + | |
| 35 | +- (void)removeChild:(UIViewController *)vc inContainer:(UIView *)view; | |
| 36 | + | |
| 37 | +- (void)removeChild:(UIViewController *)vc inContainer:(UIView *)view animation:(void (^)(void))outAnimation; | |
| 38 | + | |
| 39 | +// 默认是在self.view中操作 | |
| 40 | +- (void)replace:(UIViewController *)oldVC withNew:(UIViewController *)newVC animations:(void (^)(void))animations; | |
| 41 | + | |
| 42 | +// 在container中进行操作 | |
| 43 | +- (void)replace:(UIViewController *)oldVC withNew:(UIViewController *)newVC container:(UIView *)container animations:(void (^)(void))animations; | |
| 44 | + | |
| 45 | +@end | |
| 0 | 46 | \ No newline at end of file | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Headers/UIWindow+CNCurrentViewController.h
0 → 100644
| 1 | +// | |
| 2 | +// UIWindow+CNCurrentViewController.h | |
| 3 | +// CNLiveNetAdd | |
| 4 | +// | |
| 5 | +// Created by 流诗语 on 2018/5/14. | |
| 6 | +// Copyright © 2018年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | +@interface UIWindow (CNCurrentViewController) | |
| 12 | ++ (UIViewController*)currentViewController; | |
| 13 | +@end | ... | ... |
Example/build/Debug-iphoneos/CNLiveCommonCategory/CNLiveCommonCategory.framework/Modules/module.modulemap
0 → 100644
Example/build/Debug-iphoneos/CNLiveSubsList/CNLiveSubsList.framework/Headers/CNLiveSubsList-umbrella.h
0 → 100644
| 1 | +#ifdef __OBJC__ | |
| 2 | +#import <UIKit/UIKit.h> | |
| 3 | +#else | |
| 4 | +#ifndef FOUNDATION_EXPORT | |
| 5 | +#if defined(__cplusplus) | |
| 6 | +#define FOUNDATION_EXPORT extern "C" | |
| 7 | +#else | |
| 8 | +#define FOUNDATION_EXPORT extern | |
| 9 | +#endif | |
| 10 | +#endif | |
| 11 | +#endif | |
| 12 | + | |
| 13 | +#import "CNLiveSubsModel.h" | |
| 14 | +#import "CNLiveSubscribeCell.h" | |
| 15 | + | |
| 16 | +FOUNDATION_EXPORT double CNLiveSubsListVersionNumber; | |
| 17 | +FOUNDATION_EXPORT const unsigned char CNLiveSubsListVersionString[]; | |
| 18 | + | ... | ... |
Example/build/Debug-iphoneos/CNLiveSubsList/CNLiveSubsList.framework/Headers/CNLiveSubsModel.h
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveSubsModel.h | |
| 3 | +// Pods-CNLiveSubsList_Example | |
| 4 | +// | |
| 5 | +// Created by 殷巧娟 on 2019/2/15. | |
| 6 | +// | |
| 7 | + | |
| 8 | +#import <Realm/Realm.h> | |
| 9 | + | |
| 10 | +NS_ASSUME_NONNULL_BEGIN | |
| 11 | + | |
| 12 | +@interface CNLiveSubsModel : RLMObject | |
| 13 | +@property (nonatomic ,copy) NSString *homeId;//达人Id | |
| 14 | +@property (nonatomic ,copy) NSString *nickName;//达人昵称 | |
| 15 | +@property (nonatomic ,copy) NSString *image;//达人头像地址 | |
| 16 | +@property (nonatomic ,copy) NSString *desc;//内容 | |
| 17 | +@property (nonatomic ,assign) long long ts;//时间戳 | |
| 18 | +@end | |
| 19 | + | |
| 20 | +NS_ASSUME_NONNULL_END | ... | ... |
Example/build/Debug-iphoneos/CNLiveSubsList/CNLiveSubsList.framework/Headers/CNLiveSubscribeCell.h
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveSubscribeCell.h | |
| 3 | +// Pods-CNLiveSubsList_Example | |
| 4 | +// | |
| 5 | +// Created by 殷巧娟 on 2019/2/15. | |
| 6 | +// | |
| 7 | + | |
| 8 | +#import <QMUIKit/QMUIKit.h> | |
| 9 | + | |
| 10 | +NS_ASSUME_NONNULL_BEGIN | |
| 11 | + | |
| 12 | +typedef NS_ENUM(NSInteger, SubsType) { | |
| 13 | + SubsTypeDaren = 0,//达人号 | |
| 14 | + SubsTypeLife //生活号 | |
| 15 | +}; | |
| 16 | + | |
| 17 | +@class CNLiveSubsModel; | |
| 18 | +@interface CNLiveSubscribeCell : QMUITableViewCell | |
| 19 | +- (void)configCellWith:(CNSubsModel *)model type:(SubsType)type; | |
| 20 | +@end | |
| 21 | + | |
| 22 | +NS_ASSUME_NONNULL_END | ... | ... |
Example/build/Debug-iphoneos/CNLiveSubsList/CNLiveSubsList.framework/Modules/module.modulemap
0 → 100644
Example/build/Debug-iphoneos/Masonry/Masonry.framework/Headers/MASCompositeConstraint.h
0 → 100644
| 1 | +// | |
| 2 | +// MASCompositeConstraint.h | |
| 3 | +// Masonry | |
| 4 | +// | |
| 5 | +// Created by Jonas Budelmann on 21/07/13. | |
| 6 | +// Copyright (c) 2013 cloudling. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "MASConstraint.h" | |
| 10 | +#import "MASUtilities.h" | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * A group of MASConstraint objects | |
| 14 | + */ | |
| 15 | +@interface MASCompositeConstraint : MASConstraint | |
| 16 | + | |
| 17 | +/** | |
| 18 | + * Creates a composite with a predefined array of children | |
| 19 | + * | |
| 20 | + * @param children child MASConstraints | |
| 21 | + * | |
| 22 | + * @return a composite constraint | |
| 23 | + */ | |
| 24 | +- (id)initWithChildren:(NSArray *)children; | |
| 25 | + | |
| 26 | +@end | ... | ... |
Example/build/Debug-iphoneos/Masonry/Masonry.framework/Headers/MASConstraint+Private.h
0 → 100644
| 1 | +// | |
| 2 | +// MASConstraint+Private.h | |
| 3 | +// Masonry | |
| 4 | +// | |
| 5 | +// Created by Nick Tymchenko on 29/04/14. | |
| 6 | +// Copyright (c) 2014 cloudling. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "MASConstraint.h" | |
| 10 | + | |
| 11 | +@protocol MASConstraintDelegate; | |
| 12 | + | |
| 13 | + | |
| 14 | +@interface MASConstraint () | |
| 15 | + | |
| 16 | +/** | |
| 17 | + * Whether or not to check for an existing constraint instead of adding constraint | |
| 18 | + */ | |
| 19 | +@property (nonatomic, assign) BOOL updateExisting; | |
| 20 | + | |
| 21 | +/** | |
| 22 | + * Usually MASConstraintMaker but could be a parent MASConstraint | |
| 23 | + */ | |
| 24 | +@property (nonatomic, weak) id<MASConstraintDelegate> delegate; | |
| 25 | + | |
| 26 | +/** | |
| 27 | + * Based on a provided value type, is equal to calling: | |
| 28 | + * NSNumber - setOffset: | |
| 29 | + * NSValue with CGPoint - setPointOffset: | |
| 30 | + * NSValue with CGSize - setSizeOffset: | |
| 31 | + * NSValue with MASEdgeInsets - setInsets: | |
| 32 | + */ | |
| 33 | +- (void)setLayoutConstantWithValue:(NSValue *)value; | |
| 34 | + | |
| 35 | +@end | |
| 36 | + | |
| 37 | + | |
| 38 | +@interface MASConstraint (Abstract) | |
| 39 | + | |
| 40 | +/** | |
| 41 | + * Sets the constraint relation to given NSLayoutRelation | |
| 42 | + * returns a block which accepts one of the following: | |
| 43 | + * MASViewAttribute, UIView, NSValue, NSArray | |
| 44 | + * see readme for more details. | |
| 45 | + */ | |
| 46 | +- (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation; | |
| 47 | + | |
| 48 | +/** | |
| 49 | + * Override to set a custom chaining behaviour | |
| 50 | + */ | |
| 51 | +- (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute; | |
| 52 | + | |
| 53 | +@end | |
| 54 | + | |
| 55 | + | |
| 56 | +@protocol MASConstraintDelegate <NSObject> | |
| 57 | + | |
| 58 | +/** | |
| 59 | + * Notifies the delegate when the constraint needs to be replaced with another constraint. For example | |
| 60 | + * A MASViewConstraint may turn into a MASCompositeConstraint when an array is passed to one of the equality blocks | |
| 61 | + */ | |
| 62 | +- (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint; | |
| 63 | + | |
| 64 | +- (MASConstraint *)constraint:(MASConstraint *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute; | |
| 65 | + | |
| 66 | +@end | ... | ... |
Example/build/Debug-iphoneos/Masonry/Masonry.framework/Headers/MASConstraint.h
0 → 100644
| 1 | +// | |
| 2 | +// MASConstraint.h | |
| 3 | +// Masonry | |
| 4 | +// | |
| 5 | +// Created by Jonas Budelmann on 22/07/13. | |
| 6 | +// Copyright (c) 2013 cloudling. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "MASUtilities.h" | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * Enables Constraints to be created with chainable syntax | |
| 13 | + * Constraint can represent single NSLayoutConstraint (MASViewConstraint) | |
| 14 | + * or a group of NSLayoutConstraints (MASComposisteConstraint) | |
| 15 | + */ | |
| 16 | +@interface MASConstraint : NSObject | |
| 17 | + | |
| 18 | +// Chaining Support | |
| 19 | + | |
| 20 | +/** | |
| 21 | + * Modifies the NSLayoutConstraint constant, | |
| 22 | + * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following | |
| 23 | + * NSLayoutAttributeTop, NSLayoutAttributeLeft, NSLayoutAttributeBottom, NSLayoutAttributeRight | |
| 24 | + */ | |
| 25 | +- (MASConstraint * (^)(MASEdgeInsets insets))insets; | |
| 26 | + | |
| 27 | +/** | |
| 28 | + * Modifies the NSLayoutConstraint constant, | |
| 29 | + * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following | |
| 30 | + * NSLayoutAttributeTop, NSLayoutAttributeLeft, NSLayoutAttributeBottom, NSLayoutAttributeRight | |
| 31 | + */ | |
| 32 | +- (MASConstraint * (^)(CGFloat inset))inset; | |
| 33 | + | |
| 34 | +/** | |
| 35 | + * Modifies the NSLayoutConstraint constant, | |
| 36 | + * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following | |
| 37 | + * NSLayoutAttributeWidth, NSLayoutAttributeHeight | |
| 38 | + */ | |
| 39 | +- (MASConstraint * (^)(CGSize offset))sizeOffset; | |
| 40 | + | |
| 41 | +/** | |
| 42 | + * Modifies the NSLayoutConstraint constant, | |
| 43 | + * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following | |
| 44 | + * NSLayoutAttributeCenterX, NSLayoutAttributeCenterY | |
| 45 | + */ | |
| 46 | +- (MASConstraint * (^)(CGPoint offset))centerOffset; | |
| 47 | + | |
| 48 | +/** | |
| 49 | + * Modifies the NSLayoutConstraint constant | |
| 50 | + */ | |
| 51 | +- (MASConstraint * (^)(CGFloat offset))offset; | |
| 52 | + | |
| 53 | +/** | |
| 54 | + * Modifies the NSLayoutConstraint constant based on a value type | |
| 55 | + */ | |
| 56 | +- (MASConstraint * (^)(NSValue *value))valueOffset; | |
| 57 | + | |
| 58 | +/** | |
| 59 | + * Sets the NSLayoutConstraint multiplier property | |
| 60 | + */ | |
| 61 | +- (MASConstraint * (^)(CGFloat multiplier))multipliedBy; | |
| 62 | + | |
| 63 | +/** | |
| 64 | + * Sets the NSLayoutConstraint multiplier to 1.0/dividedBy | |
| 65 | + */ | |
| 66 | +- (MASConstraint * (^)(CGFloat divider))dividedBy; | |
| 67 | + | |
| 68 | +/** | |
| 69 | + * Sets the NSLayoutConstraint priority to a float or MASLayoutPriority | |
| 70 | + */ | |
| 71 | +- (MASConstraint * (^)(MASLayoutPriority priority))priority; | |
| 72 | + | |
| 73 | +/** | |
| 74 | + * Sets the NSLayoutConstraint priority to MASLayoutPriorityLow | |
| 75 | + */ | |
| 76 | +- (MASConstraint * (^)(void))priorityLow; | |
| 77 | + | |
| 78 | +/** | |
| 79 | + * Sets the NSLayoutConstraint priority to MASLayoutPriorityMedium | |
| 80 | + */ | |
| 81 | +- (MASConstraint * (^)(void))priorityMedium; | |
| 82 | + | |
| 83 | +/** | |
| 84 | + * Sets the NSLayoutConstraint priority to MASLayoutPriorityHigh | |
| 85 | + */ | |
| 86 | +- (MASConstraint * (^)(void))priorityHigh; | |
| 87 | + | |
| 88 | +/** | |
| 89 | + * Sets the constraint relation to NSLayoutRelationEqual | |
| 90 | + * returns a block which accepts one of the following: | |
| 91 | + * MASViewAttribute, UIView, NSValue, NSArray | |
| 92 | + * see readme for more details. | |
| 93 | + */ | |
| 94 | +- (MASConstraint * (^)(id attr))equalTo; | |
| 95 | + | |
| 96 | +/** | |
| 97 | + * Sets the constraint relation to NSLayoutRelationGreaterThanOrEqual | |
| 98 | + * returns a block which accepts one of the following: | |
| 99 | + * MASViewAttribute, UIView, NSValue, NSArray | |
| 100 | + * see readme for more details. | |
| 101 | + */ | |
| 102 | +- (MASConstraint * (^)(id attr))greaterThanOrEqualTo; | |
| 103 | + | |
| 104 | +/** | |
| 105 | + * Sets the constraint relation to NSLayoutRelationLessThanOrEqual | |
| 106 | + * returns a block which accepts one of the following: | |
| 107 | + * MASViewAttribute, UIView, NSValue, NSArray | |
| 108 | + * see readme for more details. | |
| 109 | + */ | |
| 110 | +- (MASConstraint * (^)(id attr))lessThanOrEqualTo; | |
| 111 | + | |
| 112 | +/** | |
| 113 | + * Optional semantic property which has no effect but improves the readability of constraint | |
| 114 | + */ | |
| 115 | +- (MASConstraint *)with; | |
| 116 | + | |
| 117 | +/** | |
| 118 | + * Optional semantic property which has no effect but improves the readability of constraint | |
| 119 | + */ | |
| 120 | +- (MASConstraint *)and; | |
| 121 | + | |
| 122 | +/** | |
| 123 | + * Creates a new MASCompositeConstraint with the called attribute and reciever | |
| 124 | + */ | |
| 125 | +- (MASConstraint *)left; | |
| 126 | +- (MASConstraint *)top; | |
| 127 | +- (MASConstraint *)right; | |
| 128 | +- (MASConstraint *)bottom; | |
| 129 | +- (MASConstraint *)leading; | |
| 130 | +- (MASConstraint *)trailing; | |
| 131 | +- (MASConstraint *)width; | |
| 132 | +- (MASConstraint *)height; | |
| 133 | +- (MASConstraint *)centerX; | |
| 134 | +- (MASConstraint *)centerY; | |
| 135 | +- (MASConstraint *)baseline; | |
| 136 | + | |
| 137 | +#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) | |
| 138 | + | |
| 139 | +- (MASConstraint *)firstBaseline; | |
| 140 | +- (MASConstraint *)lastBaseline; | |
| 141 | + | |
| 142 | +#endif | |
| 143 | + | |
| 144 | +#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) | |
| 145 | + | |
| 146 | +- (MASConstraint *)leftMargin; | |
| 147 | +- (MASConstraint *)rightMargin; | |
| 148 | +- (MASConstraint *)topMargin; | |
| 149 | +- (MASConstraint *)bottomMargin; | |
| 150 | +- (MASConstraint *)leadingMargin; | |
| 151 | +- (MASConstraint *)trailingMargin; | |
| 152 | +- (MASConstraint *)centerXWithinMargins; | |
| 153 | +- (MASConstraint *)centerYWithinMargins; | |
| 154 | + | |
| 155 | +#endif | |
| 156 | + | |
| 157 | + | |
| 158 | +/** | |
| 159 | + * Sets the constraint debug name | |
| 160 | + */ | |
| 161 | +- (MASConstraint * (^)(id key))key; | |
| 162 | + | |
| 163 | +// NSLayoutConstraint constant Setters | |
| 164 | +// for use outside of mas_updateConstraints/mas_makeConstraints blocks | |
| 165 | + | |
| 166 | +/** | |
| 167 | + * Modifies the NSLayoutConstraint constant, | |
| 168 | + * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following | |
| 169 | + * NSLayoutAttributeTop, NSLayoutAttributeLeft, NSLayoutAttributeBottom, NSLayoutAttributeRight | |
| 170 | + */ | |
| 171 | +- (void)setInsets:(MASEdgeInsets)insets; | |
| 172 | + | |
| 173 | +/** | |
| 174 | + * Modifies the NSLayoutConstraint constant, | |
| 175 | + * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following | |
| 176 | + * NSLayoutAttributeTop, NSLayoutAttributeLeft, NSLayoutAttributeBottom, NSLayoutAttributeRight | |
| 177 | + */ | |
| 178 | +- (void)setInset:(CGFloat)inset; | |
| 179 | + | |
| 180 | +/** | |
| 181 | + * Modifies the NSLayoutConstraint constant, | |
| 182 | + * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following | |
| 183 | + * NSLayoutAttributeWidth, NSLayoutAttributeHeight | |
| 184 | + */ | |
| 185 | +- (void)setSizeOffset:(CGSize)sizeOffset; | |
| 186 | + | |
| 187 | +/** | |
| 188 | + * Modifies the NSLayoutConstraint constant, | |
| 189 | + * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following | |
| 190 | + * NSLayoutAttributeCenterX, NSLayoutAttributeCenterY | |
| 191 | + */ | |
| 192 | +- (void)setCenterOffset:(CGPoint)centerOffset; | |
| 193 | + | |
| 194 | +/** | |
| 195 | + * Modifies the NSLayoutConstraint constant | |
| 196 | + */ | |
| 197 | +- (void)setOffset:(CGFloat)offset; | |
| 198 | + | |
| 199 | + | |
| 200 | +// NSLayoutConstraint Installation support | |
| 201 | + | |
| 202 | +#if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV) | |
| 203 | +/** | |
| 204 | + * Whether or not to go through the animator proxy when modifying the constraint | |
| 205 | + */ | |
| 206 | +@property (nonatomic, copy, readonly) MASConstraint *animator; | |
| 207 | +#endif | |
| 208 | + | |
| 209 | +/** | |
| 210 | + * Activates an NSLayoutConstraint if it's supported by an OS. | |
| 211 | + * Invokes install otherwise. | |
| 212 | + */ | |
| 213 | +- (void)activate; | |
| 214 | + | |
| 215 | +/** | |
| 216 | + * Deactivates previously installed/activated NSLayoutConstraint. | |
| 217 | + */ | |
| 218 | +- (void)deactivate; | |
| 219 | + | |
| 220 | +/** | |
| 221 | + * Creates a NSLayoutConstraint and adds it to the appropriate view. | |
| 222 | + */ | |
| 223 | +- (void)install; | |
| 224 | + | |
| 225 | +/** | |
| 226 | + * Removes previously installed NSLayoutConstraint | |
| 227 | + */ | |
| 228 | +- (void)uninstall; | |
| 229 | + | |
| 230 | +@end | |
| 231 | + | |
| 232 | + | |
| 233 | +/** | |
| 234 | + * Convenience auto-boxing macros for MASConstraint methods. | |
| 235 | + * | |
| 236 | + * Defining MAS_SHORTHAND_GLOBALS will turn on auto-boxing for default syntax. | |
| 237 | + * A potential drawback of this is that the unprefixed macros will appear in global scope. | |
| 238 | + */ | |
| 239 | +#define mas_equalTo(...) equalTo(MASBoxValue((__VA_ARGS__))) | |
| 240 | +#define mas_greaterThanOrEqualTo(...) greaterThanOrEqualTo(MASBoxValue((__VA_ARGS__))) | |
| 241 | +#define mas_lessThanOrEqualTo(...) lessThanOrEqualTo(MASBoxValue((__VA_ARGS__))) | |
| 242 | + | |
| 243 | +#define mas_offset(...) valueOffset(MASBoxValue((__VA_ARGS__))) | |
| 244 | + | |
| 245 | + | |
| 246 | +#ifdef MAS_SHORTHAND_GLOBALS | |
| 247 | + | |
| 248 | +#define equalTo(...) mas_equalTo(__VA_ARGS__) | |
| 249 | +#define greaterThanOrEqualTo(...) mas_greaterThanOrEqualTo(__VA_ARGS__) | |
| 250 | +#define lessThanOrEqualTo(...) mas_lessThanOrEqualTo(__VA_ARGS__) | |
| 251 | + | |
| 252 | +#define offset(...) mas_offset(__VA_ARGS__) | |
| 253 | + | |
| 254 | +#endif | |
| 255 | + | |
| 256 | + | |
| 257 | +@interface MASConstraint (AutoboxingSupport) | |
| 258 | + | |
| 259 | +/** | |
| 260 | + * Aliases to corresponding relation methods (for shorthand macros) | |
| 261 | + * Also needed to aid autocompletion | |
| 262 | + */ | |
| 263 | +- (MASConstraint * (^)(id attr))mas_equalTo; | |
| 264 | +- (MASConstraint * (^)(id attr))mas_greaterThanOrEqualTo; | |
| 265 | +- (MASConstraint * (^)(id attr))mas_lessThanOrEqualTo; | |
| 266 | + | |
| 267 | +/** | |
| 268 | + * A dummy method to aid autocompletion | |
| 269 | + */ | |
| 270 | +- (MASConstraint * (^)(id offset))mas_offset; | |
| 271 | + | |
| 272 | +@end | ... | ... |
Example/build/Debug-iphoneos/Masonry/Masonry.framework/Headers/MASConstraintMaker.h
0 → 100644
| 1 | +// | |
| 2 | +// MASConstraintMaker.h | |
| 3 | +// Masonry | |
| 4 | +// | |
| 5 | +// Created by Jonas Budelmann on 20/07/13. | |
| 6 | +// Copyright (c) 2013 cloudling. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "MASConstraint.h" | |
| 10 | +#import "MASUtilities.h" | |
| 11 | + | |
| 12 | +typedef NS_OPTIONS(NSInteger, MASAttribute) { | |
| 13 | + MASAttributeLeft = 1 << NSLayoutAttributeLeft, | |
| 14 | + MASAttributeRight = 1 << NSLayoutAttributeRight, | |
| 15 | + MASAttributeTop = 1 << NSLayoutAttributeTop, | |
| 16 | + MASAttributeBottom = 1 << NSLayoutAttributeBottom, | |
| 17 | + MASAttributeLeading = 1 << NSLayoutAttributeLeading, | |
| 18 | + MASAttributeTrailing = 1 << NSLayoutAttributeTrailing, | |
| 19 | + MASAttributeWidth = 1 << NSLayoutAttributeWidth, | |
| 20 | + MASAttributeHeight = 1 << NSLayoutAttributeHeight, | |
| 21 | + MASAttributeCenterX = 1 << NSLayoutAttributeCenterX, | |
| 22 | + MASAttributeCenterY = 1 << NSLayoutAttributeCenterY, | |
| 23 | + MASAttributeBaseline = 1 << NSLayoutAttributeBaseline, | |
| 24 | + | |
| 25 | +#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) | |
| 26 | + | |
| 27 | + MASAttributeFirstBaseline = 1 << NSLayoutAttributeFirstBaseline, | |
| 28 | + MASAttributeLastBaseline = 1 << NSLayoutAttributeLastBaseline, | |
| 29 | + | |
| 30 | +#endif | |
| 31 | + | |
| 32 | +#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) | |
| 33 | + | |
| 34 | + MASAttributeLeftMargin = 1 << NSLayoutAttributeLeftMargin, | |
| 35 | + MASAttributeRightMargin = 1 << NSLayoutAttributeRightMargin, | |
| 36 | + MASAttributeTopMargin = 1 << NSLayoutAttributeTopMargin, | |
| 37 | + MASAttributeBottomMargin = 1 << NSLayoutAttributeBottomMargin, | |
| 38 | + MASAttributeLeadingMargin = 1 << NSLayoutAttributeLeadingMargin, | |
| 39 | + MASAttributeTrailingMargin = 1 << NSLayoutAttributeTrailingMargin, | |
| 40 | + MASAttributeCenterXWithinMargins = 1 << NSLayoutAttributeCenterXWithinMargins, | |
| 41 | + MASAttributeCenterYWithinMargins = 1 << NSLayoutAttributeCenterYWithinMargins, | |
| 42 | + | |
| 43 | +#endif | |
| 44 | + | |
| 45 | +}; | |
| 46 | + | |
| 47 | +/** | |
| 48 | + * Provides factory methods for creating MASConstraints. | |
| 49 | + * Constraints are collected until they are ready to be installed | |
| 50 | + * | |
| 51 | + */ | |
| 52 | +@interface MASConstraintMaker : NSObject | |
| 53 | + | |
| 54 | +/** | |
| 55 | + * The following properties return a new MASViewConstraint | |
| 56 | + * with the first item set to the makers associated view and the appropriate MASViewAttribute | |
| 57 | + */ | |
| 58 | +@property (nonatomic, strong, readonly) MASConstraint *left; | |
| 59 | +@property (nonatomic, strong, readonly) MASConstraint *top; | |
| 60 | +@property (nonatomic, strong, readonly) MASConstraint *right; | |
| 61 | +@property (nonatomic, strong, readonly) MASConstraint *bottom; | |
| 62 | +@property (nonatomic, strong, readonly) MASConstraint *leading; | |
| 63 | +@property (nonatomic, strong, readonly) MASConstraint *trailing; | |
| 64 | +@property (nonatomic, strong, readonly) MASConstraint *width; | |
| 65 | +@property (nonatomic, strong, readonly) MASConstraint *height; | |
| 66 | +@property (nonatomic, strong, readonly) MASConstraint *centerX; | |
| 67 | +@property (nonatomic, strong, readonly) MASConstraint *centerY; | |
| 68 | +@property (nonatomic, strong, readonly) MASConstraint *baseline; | |
| 69 | + | |
| 70 | +#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) | |
| 71 | + | |
| 72 | +@property (nonatomic, strong, readonly) MASConstraint *firstBaseline; | |
| 73 | +@property (nonatomic, strong, readonly) MASConstraint *lastBaseline; | |
| 74 | + | |
| 75 | +#endif | |
| 76 | + | |
| 77 | +#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) | |
| 78 | + | |
| 79 | +@property (nonatomic, strong, readonly) MASConstraint *leftMargin; | |
| 80 | +@property (nonatomic, strong, readonly) MASConstraint *rightMargin; | |
| 81 | +@property (nonatomic, strong, readonly) MASConstraint *topMargin; | |
| 82 | +@property (nonatomic, strong, readonly) MASConstraint *bottomMargin; | |
| 83 | +@property (nonatomic, strong, readonly) MASConstraint *leadingMargin; | |
| 84 | +@property (nonatomic, strong, readonly) MASConstraint *trailingMargin; | |
| 85 | +@property (nonatomic, strong, readonly) MASConstraint *centerXWithinMargins; | |
| 86 | +@property (nonatomic, strong, readonly) MASConstraint *centerYWithinMargins; | |
| 87 | + | |
| 88 | +#endif | |
| 89 | + | |
| 90 | +/** | |
| 91 | + * Returns a block which creates a new MASCompositeConstraint with the first item set | |
| 92 | + * to the makers associated view and children corresponding to the set bits in the | |
| 93 | + * MASAttribute parameter. Combine multiple attributes via binary-or. | |
| 94 | + */ | |
| 95 | +@property (nonatomic, strong, readonly) MASConstraint *(^attributes)(MASAttribute attrs); | |
| 96 | + | |
| 97 | +/** | |
| 98 | + * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeEdges | |
| 99 | + * which generates the appropriate MASViewConstraint children (top, left, bottom, right) | |
| 100 | + * with the first item set to the makers associated view | |
| 101 | + */ | |
| 102 | +@property (nonatomic, strong, readonly) MASConstraint *edges; | |
| 103 | + | |
| 104 | +/** | |
| 105 | + * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeSize | |
| 106 | + * which generates the appropriate MASViewConstraint children (width, height) | |
| 107 | + * with the first item set to the makers associated view | |
| 108 | + */ | |
| 109 | +@property (nonatomic, strong, readonly) MASConstraint *size; | |
| 110 | + | |
| 111 | +/** | |
| 112 | + * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeCenter | |
| 113 | + * which generates the appropriate MASViewConstraint children (centerX, centerY) | |
| 114 | + * with the first item set to the makers associated view | |
| 115 | + */ | |
| 116 | +@property (nonatomic, strong, readonly) MASConstraint *center; | |
| 117 | + | |
| 118 | +/** | |
| 119 | + * Whether or not to check for an existing constraint instead of adding constraint | |
| 120 | + */ | |
| 121 | +@property (nonatomic, assign) BOOL updateExisting; | |
| 122 | + | |
| 123 | +/** | |
| 124 | + * Whether or not to remove existing constraints prior to installing | |
| 125 | + */ | |
| 126 | +@property (nonatomic, assign) BOOL removeExisting; | |
| 127 | + | |
| 128 | +/** | |
| 129 | + * initialises the maker with a default view | |
| 130 | + * | |
| 131 | + * @param view any MASConstraint are created with this view as the first item | |
| 132 | + * | |
| 133 | + * @return a new MASConstraintMaker | |
| 134 | + */ | |
| 135 | +- (id)initWithView:(MAS_VIEW *)view; | |
| 136 | + | |
| 137 | +/** | |
| 138 | + * Calls install method on any MASConstraints which have been created by this maker | |
| 139 | + * | |
| 140 | + * @return an array of all the installed MASConstraints | |
| 141 | + */ | |
| 142 | +- (NSArray *)install; | |
| 143 | + | |
| 144 | +- (MASConstraint * (^)(dispatch_block_t))group; | |
| 145 | + | |
| 146 | +@end | ... | ... |
Example/build/Debug-iphoneos/Masonry/Masonry.framework/Headers/MASLayoutConstraint.h
0 → 100644
| 1 | +// | |
| 2 | +// MASLayoutConstraint.h | |
| 3 | +// Masonry | |
| 4 | +// | |
| 5 | +// Created by Jonas Budelmann on 3/08/13. | |
| 6 | +// Copyright (c) 2013 Jonas Budelmann. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "MASUtilities.h" | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * When you are debugging or printing the constraints attached to a view this subclass | |
| 13 | + * makes it easier to identify which constraints have been created via Masonry | |
| 14 | + */ | |
| 15 | +@interface MASLayoutConstraint : NSLayoutConstraint | |
| 16 | + | |
| 17 | +/** | |
| 18 | + * a key to associate with this constraint | |
| 19 | + */ | |
| 20 | +@property (nonatomic, strong) id mas_key; | |
| 21 | + | |
| 22 | +@end | ... | ... |
Example/build/Debug-iphoneos/Masonry/Masonry.framework/Headers/MASUtilities.h
0 → 100644
| 1 | +// | |
| 2 | +// MASUtilities.h | |
| 3 | +// Masonry | |
| 4 | +// | |
| 5 | +// Created by Jonas Budelmann on 19/08/13. | |
| 6 | +// Copyright (c) 2013 Jonas Budelmann. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <Foundation/Foundation.h> | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | +#if TARGET_OS_IPHONE || TARGET_OS_TV | |
| 14 | + | |
| 15 | + #import <UIKit/UIKit.h> | |
| 16 | + #define MAS_VIEW UIView | |
| 17 | + #define MAS_VIEW_CONTROLLER UIViewController | |
| 18 | + #define MASEdgeInsets UIEdgeInsets | |
| 19 | + | |
| 20 | + typedef UILayoutPriority MASLayoutPriority; | |
| 21 | + static const MASLayoutPriority MASLayoutPriorityRequired = UILayoutPriorityRequired; | |
| 22 | + static const MASLayoutPriority MASLayoutPriorityDefaultHigh = UILayoutPriorityDefaultHigh; | |
| 23 | + static const MASLayoutPriority MASLayoutPriorityDefaultMedium = 500; | |
| 24 | + static const MASLayoutPriority MASLayoutPriorityDefaultLow = UILayoutPriorityDefaultLow; | |
| 25 | + static const MASLayoutPriority MASLayoutPriorityFittingSizeLevel = UILayoutPriorityFittingSizeLevel; | |
| 26 | + | |
| 27 | +#elif TARGET_OS_MAC | |
| 28 | + | |
| 29 | + #import <AppKit/AppKit.h> | |
| 30 | + #define MAS_VIEW NSView | |
| 31 | + #define MASEdgeInsets NSEdgeInsets | |
| 32 | + | |
| 33 | + typedef NSLayoutPriority MASLayoutPriority; | |
| 34 | + static const MASLayoutPriority MASLayoutPriorityRequired = NSLayoutPriorityRequired; | |
| 35 | + static const MASLayoutPriority MASLayoutPriorityDefaultHigh = NSLayoutPriorityDefaultHigh; | |
| 36 | + static const MASLayoutPriority MASLayoutPriorityDragThatCanResizeWindow = NSLayoutPriorityDragThatCanResizeWindow; | |
| 37 | + static const MASLayoutPriority MASLayoutPriorityDefaultMedium = 501; | |
| 38 | + static const MASLayoutPriority MASLayoutPriorityWindowSizeStayPut = NSLayoutPriorityWindowSizeStayPut; | |
| 39 | + static const MASLayoutPriority MASLayoutPriorityDragThatCannotResizeWindow = NSLayoutPriorityDragThatCannotResizeWindow; | |
| 40 | + static const MASLayoutPriority MASLayoutPriorityDefaultLow = NSLayoutPriorityDefaultLow; | |
| 41 | + static const MASLayoutPriority MASLayoutPriorityFittingSizeCompression = NSLayoutPriorityFittingSizeCompression; | |
| 42 | + | |
| 43 | +#endif | |
| 44 | + | |
| 45 | +/** | |
| 46 | + * Allows you to attach keys to objects matching the variable names passed. | |
| 47 | + * | |
| 48 | + * view1.mas_key = @"view1", view2.mas_key = @"view2"; | |
| 49 | + * | |
| 50 | + * is equivalent to: | |
| 51 | + * | |
| 52 | + * MASAttachKeys(view1, view2); | |
| 53 | + */ | |
| 54 | +#define MASAttachKeys(...) \ | |
| 55 | + { \ | |
| 56 | + NSDictionary *keyPairs = NSDictionaryOfVariableBindings(__VA_ARGS__); \ | |
| 57 | + for (id key in keyPairs.allKeys) { \ | |
| 58 | + id obj = keyPairs[key]; \ | |
| 59 | + NSAssert([obj respondsToSelector:@selector(setMas_key:)], \ | |
| 60 | + @"Cannot attach mas_key to %@", obj); \ | |
| 61 | + [obj setMas_key:key]; \ | |
| 62 | + } \ | |
| 63 | + } | |
| 64 | + | |
| 65 | +/** | |
| 66 | + * Used to create object hashes | |
| 67 | + * Based on http://www.mikeash.com/pyblog/friday-qa-2010-06-18-implementing-equality-and-hashing.html | |
| 68 | + */ | |
| 69 | +#define MAS_NSUINT_BIT (CHAR_BIT * sizeof(NSUInteger)) | |
| 70 | +#define MAS_NSUINTROTATE(val, howmuch) ((((NSUInteger)val) << howmuch) | (((NSUInteger)val) >> (MAS_NSUINT_BIT - howmuch))) | |
| 71 | + | |
| 72 | +/** | |
| 73 | + * Given a scalar or struct value, wraps it in NSValue | |
| 74 | + * Based on EXPObjectify: https://github.com/specta/expecta | |
| 75 | + */ | |
| 76 | +static inline id _MASBoxValue(const char *type, ...) { | |
| 77 | + va_list v; | |
| 78 | + va_start(v, type); | |
| 79 | + id obj = nil; | |
| 80 | + if (strcmp(type, @encode(id)) == 0) { | |
| 81 | + id actual = va_arg(v, id); | |
| 82 | + obj = actual; | |
| 83 | + } else if (strcmp(type, @encode(CGPoint)) == 0) { | |
| 84 | + CGPoint actual = (CGPoint)va_arg(v, CGPoint); | |
| 85 | + obj = [NSValue value:&actual withObjCType:type]; | |
| 86 | + } else if (strcmp(type, @encode(CGSize)) == 0) { | |
| 87 | + CGSize actual = (CGSize)va_arg(v, CGSize); | |
| 88 | + obj = [NSValue value:&actual withObjCType:type]; | |
| 89 | + } else if (strcmp(type, @encode(MASEdgeInsets)) == 0) { | |
| 90 | + MASEdgeInsets actual = (MASEdgeInsets)va_arg(v, MASEdgeInsets); | |
| 91 | + obj = [NSValue value:&actual withObjCType:type]; | |
| 92 | + } else if (strcmp(type, @encode(double)) == 0) { | |
| 93 | + double actual = (double)va_arg(v, double); | |
| 94 | + obj = [NSNumber numberWithDouble:actual]; | |
| 95 | + } else if (strcmp(type, @encode(float)) == 0) { | |
| 96 | + float actual = (float)va_arg(v, double); | |
| 97 | + obj = [NSNumber numberWithFloat:actual]; | |
| 98 | + } else if (strcmp(type, @encode(int)) == 0) { | |
| 99 | + int actual = (int)va_arg(v, int); | |
| 100 | + obj = [NSNumber numberWithInt:actual]; | |
| 101 | + } else if (strcmp(type, @encode(long)) == 0) { | |
| 102 | + long actual = (long)va_arg(v, long); | |
| 103 | + obj = [NSNumber numberWithLong:actual]; | |
| 104 | + } else if (strcmp(type, @encode(long long)) == 0) { | |
| 105 | + long long actual = (long long)va_arg(v, long long); | |
| 106 | + obj = [NSNumber numberWithLongLong:actual]; | |
| 107 | + } else if (strcmp(type, @encode(short)) == 0) { | |
| 108 | + short actual = (short)va_arg(v, int); | |
| 109 | + obj = [NSNumber numberWithShort:actual]; | |
| 110 | + } else if (strcmp(type, @encode(char)) == 0) { | |
| 111 | + char actual = (char)va_arg(v, int); | |
| 112 | + obj = [NSNumber numberWithChar:actual]; | |
| 113 | + } else if (strcmp(type, @encode(bool)) == 0) { | |
| 114 | + bool actual = (bool)va_arg(v, int); | |
| 115 | + obj = [NSNumber numberWithBool:actual]; | |
| 116 | + } else if (strcmp(type, @encode(unsigned char)) == 0) { | |
| 117 | + unsigned char actual = (unsigned char)va_arg(v, unsigned int); | |
| 118 | + obj = [NSNumber numberWithUnsignedChar:actual]; | |
| 119 | + } else if (strcmp(type, @encode(unsigned int)) == 0) { | |
| 120 | + unsigned int actual = (unsigned int)va_arg(v, unsigned int); | |
| 121 | + obj = [NSNumber numberWithUnsignedInt:actual]; | |
| 122 | + } else if (strcmp(type, @encode(unsigned long)) == 0) { | |
| 123 | + unsigned long actual = (unsigned long)va_arg(v, unsigned long); | |
| 124 | + obj = [NSNumber numberWithUnsignedLong:actual]; | |
| 125 | + } else if (strcmp(type, @encode(unsigned long long)) == 0) { | |
| 126 | + unsigned long long actual = (unsigned long long)va_arg(v, unsigned long long); | |
| 127 | + obj = [NSNumber numberWithUnsignedLongLong:actual]; | |
| 128 | + } else if (strcmp(type, @encode(unsigned short)) == 0) { | |
| 129 | + unsigned short actual = (unsigned short)va_arg(v, unsigned int); | |
| 130 | + obj = [NSNumber numberWithUnsignedShort:actual]; | |
| 131 | + } | |
| 132 | + va_end(v); | |
| 133 | + return obj; | |
| 134 | +} | |
| 135 | + | |
| 136 | +#define MASBoxValue(value) _MASBoxValue(@encode(__typeof__((value))), (value)) | ... | ... |
Example/build/Debug-iphoneos/Masonry/Masonry.framework/Headers/MASViewAttribute.h
0 → 100644
| 1 | +// | |
| 2 | +// MASViewAttribute.h | |
| 3 | +// Masonry | |
| 4 | +// | |
| 5 | +// Created by Jonas Budelmann on 21/07/13. | |
| 6 | +// Copyright (c) 2013 cloudling. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "MASUtilities.h" | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * An immutable tuple which stores the view and the related NSLayoutAttribute. | |
| 13 | + * Describes part of either the left or right hand side of a constraint equation | |
| 14 | + */ | |
| 15 | +@interface MASViewAttribute : NSObject | |
| 16 | + | |
| 17 | +/** | |
| 18 | + * The view which the reciever relates to. Can be nil if item is not a view. | |
| 19 | + */ | |
| 20 | +@property (nonatomic, weak, readonly) MAS_VIEW *view; | |
| 21 | + | |
| 22 | +/** | |
| 23 | + * The item which the reciever relates to. | |
| 24 | + */ | |
| 25 | +@property (nonatomic, weak, readonly) id item; | |
| 26 | + | |
| 27 | +/** | |
| 28 | + * The attribute which the reciever relates to | |
| 29 | + */ | |
| 30 | +@property (nonatomic, assign, readonly) NSLayoutAttribute layoutAttribute; | |
| 31 | + | |
| 32 | +/** | |
| 33 | + * Convenience initializer. | |
| 34 | + */ | |
| 35 | +- (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute; | |
| 36 | + | |
| 37 | +/** | |
| 38 | + * The designated initializer. | |
| 39 | + */ | |
| 40 | +- (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute; | |
| 41 | + | |
| 42 | +/** | |
| 43 | + * Determine whether the layoutAttribute is a size attribute | |
| 44 | + * | |
| 45 | + * @return YES if layoutAttribute is equal to NSLayoutAttributeWidth or NSLayoutAttributeHeight | |
| 46 | + */ | |
| 47 | +- (BOOL)isSizeAttribute; | |
| 48 | + | |
| 49 | +@end | ... | ... |
Example/build/Debug-iphoneos/Masonry/Masonry.framework/Headers/MASViewConstraint.h
0 → 100644
| 1 | +// | |
| 2 | +// MASViewConstraint.h | |
| 3 | +// Masonry | |
| 4 | +// | |
| 5 | +// Created by Jonas Budelmann on 20/07/13. | |
| 6 | +// Copyright (c) 2013 cloudling. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "MASViewAttribute.h" | |
| 10 | +#import "MASConstraint.h" | |
| 11 | +#import "MASLayoutConstraint.h" | |
| 12 | +#import "MASUtilities.h" | |
| 13 | + | |
| 14 | +/** | |
| 15 | + * A single constraint. | |
| 16 | + * Contains the attributes neccessary for creating a NSLayoutConstraint and adding it to the appropriate view | |
| 17 | + */ | |
| 18 | +@interface MASViewConstraint : MASConstraint <NSCopying> | |
| 19 | + | |
| 20 | +/** | |
| 21 | + * First item/view and first attribute of the NSLayoutConstraint | |
| 22 | + */ | |
| 23 | +@property (nonatomic, strong, readonly) MASViewAttribute *firstViewAttribute; | |
| 24 | + | |
| 25 | +/** | |
| 26 | + * Second item/view and second attribute of the NSLayoutConstraint | |
| 27 | + */ | |
| 28 | +@property (nonatomic, strong, readonly) MASViewAttribute *secondViewAttribute; | |
| 29 | + | |
| 30 | +/** | |
| 31 | + * initialises the MASViewConstraint with the first part of the equation | |
| 32 | + * | |
| 33 | + * @param firstViewAttribute view.mas_left, view.mas_width etc. | |
| 34 | + * | |
| 35 | + * @return a new view constraint | |
| 36 | + */ | |
| 37 | +- (id)initWithFirstViewAttribute:(MASViewAttribute *)firstViewAttribute; | |
| 38 | + | |
| 39 | +/** | |
| 40 | + * Returns all MASViewConstraints installed with this view as a first item. | |
| 41 | + * | |
| 42 | + * @param view A view to retrieve constraints for. | |
| 43 | + * | |
| 44 | + * @return An array of MASViewConstraints. | |
| 45 | + */ | |
| 46 | ++ (NSArray *)installedConstraintsForView:(MAS_VIEW *)view; | |
| 47 | + | |
| 48 | +@end | ... | ... |
Example/build/Debug-iphoneos/Masonry/Masonry.framework/Headers/Masonry-umbrella.h
0 → 100644
| 1 | +#ifdef __OBJC__ | |
| 2 | +#import <UIKit/UIKit.h> | |
| 3 | +#else | |
| 4 | +#ifndef FOUNDATION_EXPORT | |
| 5 | +#if defined(__cplusplus) | |
| 6 | +#define FOUNDATION_EXPORT extern "C" | |
| 7 | +#else | |
| 8 | +#define FOUNDATION_EXPORT extern | |
| 9 | +#endif | |
| 10 | +#endif | |
| 11 | +#endif | |
| 12 | + | |
| 13 | +#import "MASCompositeConstraint.h" | |
| 14 | +#import "MASConstraint+Private.h" | |
| 15 | +#import "MASConstraint.h" | |
| 16 | +#import "MASConstraintMaker.h" | |
| 17 | +#import "MASLayoutConstraint.h" | |
| 18 | +#import "Masonry.h" | |
| 19 | +#import "MASUtilities.h" | |
| 20 | +#import "MASViewAttribute.h" | |
| 21 | +#import "MASViewConstraint.h" | |
| 22 | +#import "NSArray+MASAdditions.h" | |
| 23 | +#import "NSArray+MASShorthandAdditions.h" | |
| 24 | +#import "NSLayoutConstraint+MASDebugAdditions.h" | |
| 25 | +#import "View+MASAdditions.h" | |
| 26 | +#import "View+MASShorthandAdditions.h" | |
| 27 | +#import "ViewController+MASAdditions.h" | |
| 28 | + | |
| 29 | +FOUNDATION_EXPORT double MasonryVersionNumber; | |
| 30 | +FOUNDATION_EXPORT const unsigned char MasonryVersionString[]; | |
| 31 | + | ... | ... |
Example/build/Debug-iphoneos/Masonry/Masonry.framework/Headers/Masonry.h
0 → 100644
| 1 | +// | |
| 2 | +// Masonry.h | |
| 3 | +// Masonry | |
| 4 | +// | |
| 5 | +// Created by Jonas Budelmann on 20/07/13. | |
| 6 | +// Copyright (c) 2013 cloudling. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <Foundation/Foundation.h> | |
| 10 | + | |
| 11 | +//! Project version number for Masonry. | |
| 12 | +FOUNDATION_EXPORT double MasonryVersionNumber; | |
| 13 | + | |
| 14 | +//! Project version string for Masonry. | |
| 15 | +FOUNDATION_EXPORT const unsigned char MasonryVersionString[]; | |
| 16 | + | |
| 17 | +#import "MASUtilities.h" | |
| 18 | +#import "View+MASAdditions.h" | |
| 19 | +#import "View+MASShorthandAdditions.h" | |
| 20 | +#import "ViewController+MASAdditions.h" | |
| 21 | +#import "NSArray+MASAdditions.h" | |
| 22 | +#import "NSArray+MASShorthandAdditions.h" | |
| 23 | +#import "MASConstraint.h" | |
| 24 | +#import "MASCompositeConstraint.h" | |
| 25 | +#import "MASViewAttribute.h" | |
| 26 | +#import "MASViewConstraint.h" | |
| 27 | +#import "MASConstraintMaker.h" | |
| 28 | +#import "MASLayoutConstraint.h" | |
| 29 | +#import "NSLayoutConstraint+MASDebugAdditions.h" | ... | ... |
Example/build/Debug-iphoneos/Masonry/Masonry.framework/Headers/NSArray+MASAdditions.h
0 → 100644
| 1 | +// | |
| 2 | +// NSArray+MASAdditions.h | |
| 3 | +// | |
| 4 | +// | |
| 5 | +// Created by Daniel Hammond on 11/26/13. | |
| 6 | +// | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "MASUtilities.h" | |
| 10 | +#import "MASConstraintMaker.h" | |
| 11 | +#import "MASViewAttribute.h" | |
| 12 | + | |
| 13 | +typedef NS_ENUM(NSUInteger, MASAxisType) { | |
| 14 | + MASAxisTypeHorizontal, | |
| 15 | + MASAxisTypeVertical | |
| 16 | +}; | |
| 17 | + | |
| 18 | +@interface NSArray (MASAdditions) | |
| 19 | + | |
| 20 | +/** | |
| 21 | + * Creates a MASConstraintMaker with each view in the callee. | |
| 22 | + * Any constraints defined are added to the view or the appropriate superview once the block has finished executing on each view | |
| 23 | + * | |
| 24 | + * @param block scope within which you can build up the constraints which you wish to apply to each view. | |
| 25 | + * | |
| 26 | + * @return Array of created MASConstraints | |
| 27 | + */ | |
| 28 | +- (NSArray *)mas_makeConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block; | |
| 29 | + | |
| 30 | +/** | |
| 31 | + * Creates a MASConstraintMaker with each view in the callee. | |
| 32 | + * Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view. | |
| 33 | + * If an existing constraint exists then it will be updated instead. | |
| 34 | + * | |
| 35 | + * @param block scope within which you can build up the constraints which you wish to apply to each view. | |
| 36 | + * | |
| 37 | + * @return Array of created/updated MASConstraints | |
| 38 | + */ | |
| 39 | +- (NSArray *)mas_updateConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block; | |
| 40 | + | |
| 41 | +/** | |
| 42 | + * Creates a MASConstraintMaker with each view in the callee. | |
| 43 | + * Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view. | |
| 44 | + * All constraints previously installed for the views will be removed. | |
| 45 | + * | |
| 46 | + * @param block scope within which you can build up the constraints which you wish to apply to each view. | |
| 47 | + * | |
| 48 | + * @return Array of created/updated MASConstraints | |
| 49 | + */ | |
| 50 | +- (NSArray *)mas_remakeConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block; | |
| 51 | + | |
| 52 | +/** | |
| 53 | + * distribute with fixed spacing | |
| 54 | + * | |
| 55 | + * @param axisType which axis to distribute items along | |
| 56 | + * @param fixedSpacing the spacing between each item | |
| 57 | + * @param leadSpacing the spacing before the first item and the container | |
| 58 | + * @param tailSpacing the spacing after the last item and the container | |
| 59 | + */ | |
| 60 | +- (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedSpacing:(CGFloat)fixedSpacing leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing; | |
| 61 | + | |
| 62 | +/** | |
| 63 | + * distribute with fixed item size | |
| 64 | + * | |
| 65 | + * @param axisType which axis to distribute items along | |
| 66 | + * @param fixedItemLength the fixed length of each item | |
| 67 | + * @param leadSpacing the spacing before the first item and the container | |
| 68 | + * @param tailSpacing the spacing after the last item and the container | |
| 69 | + */ | |
| 70 | +- (void)mas_distributeViewsAlongAxis:(MASAxisType)axisType withFixedItemLength:(CGFloat)fixedItemLength leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing; | |
| 71 | + | |
| 72 | +@end | ... | ... |
Example/build/Debug-iphoneos/Masonry/Masonry.framework/Headers/NSArray+MASShorthandAdditions.h
0 → 100644
| 1 | +// | |
| 2 | +// NSArray+MASShorthandAdditions.h | |
| 3 | +// Masonry | |
| 4 | +// | |
| 5 | +// Created by Jonas Budelmann on 22/07/13. | |
| 6 | +// Copyright (c) 2013 Jonas Budelmann. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "NSArray+MASAdditions.h" | |
| 10 | + | |
| 11 | +#ifdef MAS_SHORTHAND | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * Shorthand array additions without the 'mas_' prefixes, | |
| 15 | + * only enabled if MAS_SHORTHAND is defined | |
| 16 | + */ | |
| 17 | +@interface NSArray (MASShorthandAdditions) | |
| 18 | + | |
| 19 | +- (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block; | |
| 20 | +- (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block; | |
| 21 | +- (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block; | |
| 22 | + | |
| 23 | +@end | |
| 24 | + | |
| 25 | +@implementation NSArray (MASShorthandAdditions) | |
| 26 | + | |
| 27 | +- (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *))block { | |
| 28 | + return [self mas_makeConstraints:block]; | |
| 29 | +} | |
| 30 | + | |
| 31 | +- (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *))block { | |
| 32 | + return [self mas_updateConstraints:block]; | |
| 33 | +} | |
| 34 | + | |
| 35 | +- (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *))block { | |
| 36 | + return [self mas_remakeConstraints:block]; | |
| 37 | +} | |
| 38 | + | |
| 39 | +@end | |
| 40 | + | |
| 41 | +#endif | ... | ... |
Example/build/Debug-iphoneos/Masonry/Masonry.framework/Headers/NSLayoutConstraint+MASDebugAdditions.h
0 → 100644
| 1 | +// | |
| 2 | +// NSLayoutConstraint+MASDebugAdditions.h | |
| 3 | +// Masonry | |
| 4 | +// | |
| 5 | +// Created by Jonas Budelmann on 3/08/13. | |
| 6 | +// Copyright (c) 2013 Jonas Budelmann. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "MASUtilities.h" | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * makes debug and log output of NSLayoutConstraints more readable | |
| 13 | + */ | |
| 14 | +@interface NSLayoutConstraint (MASDebugAdditions) | |
| 15 | + | |
| 16 | +@end | ... | ... |