├── FeiTuYunChuan ├── FTWidgetClipModel.h ├── FTWidgetClipModel.m ├── FeiTuYunChuan.entitlements ├── Info.plist ├── MainInterface.storyboard ├── TodayTableViewCell.h ├── TodayTableViewCell.m ├── TodayViewController.h ├── TodayViewController.m ├── add.png ├── add_bg.png ├── andriod.png ├── iphone.png ├── left.png ├── logo.png ├── mac.png ├── pc.png ├── right.png └── up.png ├── MyWidget.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcuserdata │ └── humingtao.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── FeiTuYunChuan.xcscheme │ ├── MyWidget.xcscheme │ └── xcschememanagement.plist ├── MyWidget ├── AppDelegate.h ├── AppDelegate.m ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard ├── Images.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist ├── MyWidget.entitlements ├── ViewController.h ├── ViewController.m └── main.m ├── MyWidgetTests ├── Info.plist └── MyWidgetTests.m └── README.md /FeiTuYunChuan/FTWidgetClipModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // FTWidgetClipModel.h 3 | // MyWidget 4 | // 5 | // Created by HMT on 14/10/29. 6 | // Copyright (c) 2014年 MTH. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface FTWidgetClipModel : NSObject 12 | 13 | @property (nonatomic, copy) NSString *userName; 14 | @property (nonatomic, copy) NSString *content; 15 | @property (nonatomic, copy) NSString *clipTime; 16 | @property (nonatomic, copy) NSString *isTure; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /FeiTuYunChuan/FTWidgetClipModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // FTWidgetClipModel.m 3 | // MyWidget 4 | // 5 | // Created by HMT on 14/10/29. 6 | // Copyright (c) 2014年 MTH. All rights reserved. 7 | // 8 | 9 | #import "FTWidgetClipModel.h" 10 | 11 | @implementation FTWidgetClipModel 12 | 13 | - (id)initWithCoder:(NSCoder *)aDecoder { 14 | if (self = [super init]) { 15 | self.userName = [aDecoder decodeObjectForKey:@"UserName"]; 16 | self.content = [aDecoder decodeObjectForKey:@"Content"]; 17 | self.clipTime = [aDecoder decodeObjectForKey:@"ClipTime"]; 18 | self.isTure = [aDecoder decodeObjectForKey:@"IsTure"]; 19 | } 20 | return self; 21 | } 22 | 23 | - (void)encodeWithCoder:(NSCoder *)aCoder { 24 | [aCoder encodeObject:_userName forKey:@"UserName"]; 25 | [aCoder encodeObject:_content forKey:@"Content"]; 26 | [aCoder encodeObject:_clipTime forKey:@"ClipTime"]; 27 | [aCoder encodeObject:_isTure forKey:@"IsTure"]; 28 | } 29 | 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /FeiTuYunChuan/FeiTuYunChuan.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.application-groups 6 | 7 | group.com.tranfer 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /FeiTuYunChuan/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | 飞兔云传 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | com.HMT.MyWidget.$(PRODUCT_NAME:rfc1034identifier) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | XPC! 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | NSExtension 26 | 27 | NSExtensionMainStoryboard 28 | MainInterface 29 | NSExtensionPointIdentifier 30 | com.apple.widget-extension 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /FeiTuYunChuan/MainInterface.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 49 | 61 | 73 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 110 | 111 | 112 | 113 | 123 | 129 | 135 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 180 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | -------------------------------------------------------------------------------- /FeiTuYunChuan/TodayTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // todayTableViewCell.h 3 | // TodayWidget 4 | // 5 | // Created by HMT on 14/10/28. 6 | // Copyright (c) 2014年 MTH. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class TodayTableViewCell; 12 | @protocol FTTranViewViewDelegate 13 | 14 | @optional 15 | - (void)transViewAction:(TodayTableViewCell *)todayCell; 16 | - (void)enterContainingApp; 17 | - (void)deleteClipBoardCell:(TodayTableViewCell *)todayCell; 18 | - (void)makeTureContent:(TodayTableViewCell *)todayCell; 19 | - (void)sendClipBoardContent:(TodayTableViewCell *)todayCell; 20 | @end 21 | 22 | @interface TodayTableViewCell : UITableViewCell 23 | 24 | // 主视图 25 | @property (weak, nonatomic) IBOutlet UILabel *nameLabel; 26 | @property (weak, nonatomic) IBOutlet UILabel *contentLabel; 27 | @property (weak, nonatomic) IBOutlet UILabel *timeLabel; 28 | @property (weak, nonatomic) IBOutlet UIView *backView; 29 | @property (weak, nonatomic) IBOutlet UILabel *didCopyLabel; 30 | @property (weak, nonatomic) IBOutlet UIButton *rightEnterButton; 31 | 32 | // add视图 33 | @property (weak, nonatomic) IBOutlet UIView *addBackView; 34 | @property (weak, nonatomic) IBOutlet UILabel *addContentLabel; 35 | @property (weak, nonatomic) IBOutlet UIButton *addButton; 36 | 37 | // 辅助 38 | @property (nonatomic, assign) id delegate; 39 | @property (nonatomic, assign) BOOL isShowRight; 40 | @property (nonatomic, assign) NSUInteger belongRow; 41 | @property (nonatomic, copy) NSString *isTureNeed; 42 | 43 | // 右边视图 44 | @property (weak, nonatomic) IBOutlet UIView *rightBackView; 45 | @property (weak, nonatomic) IBOutlet UIButton *leftImageButton; 46 | @property (weak, nonatomic) IBOutlet UIButton *deleteButton; 47 | @property (weak, nonatomic) IBOutlet UIButton *sendButton; 48 | @property (weak, nonatomic) IBOutlet UIButton *moreButton; 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /FeiTuYunChuan/TodayTableViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // todayTableViewCell.m 3 | // TodayWidget 4 | // 5 | // Created by HMT on 14/10/28. 6 | // Copyright (c) 2014年 MTH. All rights reserved. 7 | // 8 | 9 | #import "TodayTableViewCell.h" 10 | 11 | @implementation TodayTableViewCell 12 | 13 | - (void)awakeFromNib { 14 | // Initialization code 15 | self.isShowRight = NO; 16 | [self.didCopyLabel setTextColor:[UIColor whiteColor]]; 17 | [self.rightEnterButton setImage:[UIImage imageNamed:@"right"] forState:UIControlStateNormal]; 18 | [self.leftImageButton setImage:[UIImage imageNamed:@"left"] forState:UIControlStateNormal]; 19 | } 20 | 21 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 22 | [super setSelected:selected animated:animated]; 23 | 24 | // Configure the view for the selected state 25 | } 26 | 27 | - (IBAction)didClickRightEnterButtonAction:(UIButton *)sender { 28 | if ([self.delegate respondsToSelector:@selector(transViewAction:)]) { 29 | [self.delegate transViewAction:self]; 30 | } 31 | } 32 | 33 | - (IBAction)didClickDeleteButtonAction:(UIButton *)sender { 34 | if ([self.delegate respondsToSelector:@selector(deleteClipBoardCell:)]) { 35 | [self.delegate deleteClipBoardCell:self]; 36 | } 37 | } 38 | 39 | - (IBAction)didClickSendButtonAction:(UIButton *)sender { 40 | if ([self.delegate respondsToSelector:@selector(sendClipBoardContent:)]) { 41 | [self.delegate sendClipBoardContent:self]; 42 | } 43 | } 44 | 45 | - (IBAction)didClickMoreButtonAction:(UIButton *)sender { 46 | if ([self.delegate respondsToSelector:@selector(enterContainingApp)]) { 47 | [self.delegate enterContainingApp]; 48 | } 49 | } 50 | 51 | - (IBAction)didClickMakeTureButtonAction:(UIButton *)sender { 52 | if ([self.delegate respondsToSelector:@selector(makeTureContent:)]) { 53 | [self.delegate makeTureContent:self]; 54 | } 55 | } 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /FeiTuYunChuan/TodayViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TodayViewController.h 3 | // TodayExtension 4 | // 5 | // Created by HMT on 14/10/28. 6 | // Copyright (c) 2014年 MTH. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface TodayViewController : UIViewController 13 | 14 | @property (weak, nonatomic) IBOutlet UITableView *mainTableView; 15 | 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /FeiTuYunChuan/TodayViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // TodayViewController.m 3 | // TodayExtension 4 | // 5 | // Created by HMT on 14/10/28. 6 | // Copyright (c) 2014年 MTH. All rights reserved. 7 | // 8 | 9 | #import "TodayViewController.h" 10 | #import 11 | #import "TodayTableViewCell.h" 12 | #import "FTWidgetClipModel.h" 13 | 14 | @interface TodayViewController () 15 | 16 | @property (nonatomic, strong) UIButton *headButton; 17 | @property (nonatomic, strong) UIButton *leftImageButton; 18 | @property (nonatomic, strong) NSMutableArray *allDataArray; 19 | @property (nonatomic, copy) NSString *lastPasteBoard; 20 | @property (nonatomic, strong) NSMutableDictionary *hideStateDic; 21 | 22 | @end 23 | 24 | @implementation TodayViewController 25 | 26 | static NSString *const KArchiverKey = @"DataArray"; 27 | static NSString *const KArchiverLastClipKey = @"LastClipKey"; 28 | static NSString *const KHideStateKey = @"HideStateKey"; 29 | static const NSTimeInterval kCopyAnimationDuration = 0.6; 30 | static const NSTimeInterval kTranAnimationDuration = 0.5; 31 | static const NSTimeInterval KUpAndDownAnimationDuration = 0.3; 32 | 33 | - (void)viewDidLoad { 34 | [super viewDidLoad]; 35 | // Do any additional setup after loading the view from its nib. 36 | self.view.backgroundColor = [UIColor clearColor]; 37 | self.hideStateDic = [NSMutableDictionary dictionary]; 38 | self.headButton = [UIButton buttonWithType:UIButtonTypeSystem]; 39 | self.leftImageButton = [UIButton buttonWithType:UIButtonTypeCustom]; 40 | 41 | // 数据处理(需要固化) 42 | NSUserDefaults *sharedUserDefaults = [[NSUserDefaults alloc] initWithSuiteName:@"group.com.tranfer"]; 43 | NSData *unarchiverData = [sharedUserDefaults objectForKey:KArchiverKey]; 44 | // 特别注意,[NSKeyedUnarchiver unarchiveObjectWithData:unarchiverData] 转化的是一个数组,因为我固化的是一个数组 45 | // PS:allDataArray 的类型 是 NSMutableArray 46 | // 不能直接用self.allDataArray = [NSKeyedUnarchiver unarchiveObjectWithData:unarchiverData]; 47 | self.allDataArray = [NSMutableArray arrayWithArray:[NSKeyedUnarchiver unarchiveObjectWithData:unarchiverData]]; 48 | NSData *lastStringData = [sharedUserDefaults objectForKey:KArchiverLastClipKey]; 49 | self.lastPasteBoard = [NSKeyedUnarchiver unarchiveObjectWithData:lastStringData]; 50 | 51 | // 系统剪切板 52 | UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; 53 | [pasteboard setPersistent:YES]; 54 | if (pasteboard.string && ![pasteboard.string isEqualToString:self.lastPasteBoard]) { 55 | FTWidgetClipModel *widgetClip = [[FTWidgetClipModel alloc] init]; 56 | widgetClip.userName = [[UIDevice currentDevice] name]; 57 | widgetClip.content = pasteboard.string; 58 | widgetClip.clipTime = [NSString stringWithFormat:@"%f",[[NSDate date] timeIntervalSince1970]]; 59 | widgetClip.isTure = @"False"; 60 | if (self.allDataArray.count >= 1 && self.allDataArray.count < 5 ) { 61 | [self.allDataArray insertObject:widgetClip atIndex:0]; 62 | } else if (self.allDataArray.count == 5){ 63 | [self.allDataArray removeObjectAtIndex:4]; 64 | [self.allDataArray insertObject:widgetClip atIndex:0]; 65 | } else { 66 | [self.allDataArray addObject:widgetClip]; 67 | } 68 | 69 | // 固化数据 70 | [self _saveDataToSanBoxWithDataArray:_allDataArray]; 71 | self.lastPasteBoard = pasteboard.string; 72 | [self _saveLastClipboard:_lastPasteBoard]; 73 | 74 | [self.hideStateDic setObject:@"隐藏最近剪辑" forKey:KHideStateKey]; 75 | } else { 76 | } 77 | 78 | if (self.allDataArray.count == 0 || !pasteboard.string) { 79 | [self.hideStateDic setObject:@"没有复制任何内容" forKey:KHideStateKey]; 80 | } else { 81 | [self.hideStateDic setObject:@"隐藏最近剪辑" forKey:KHideStateKey]; 82 | } 83 | 84 | // 调整高度 85 | self.preferredContentSize = CGSizeMake(self.view.bounds.size.width, 400-72*(5 - _allDataArray.count)); 86 | 87 | //[self _showOrHideHeadSectionAction]; 88 | } 89 | 90 | #pragma mark - NCWidgetProviding Method 91 | // 一般默认的View是从图标的右边开始的...如果你想变换,就要实现这个方法 92 | - (UIEdgeInsets)widgetMarginInsetsForProposedMarginInsets:(UIEdgeInsets)defaultMarginInsets { 93 | //UIEdgeInsets newMarginInsets = UIEdgeInsetsMake(defaultMarginInsets.top, defaultMarginInsets.left - 16, defaultMarginInsets.bottom, defaultMarginInsets.right); 94 | //return newMarginInsets; 95 | //return UIEdgeInsetsZero; // 完全靠到了左边.... 96 | return UIEdgeInsetsMake(0.0, 16.0, 0, 0); 97 | } 98 | 99 | #pragma mark - UITableViewDataSource Methods 100 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 101 | return 2; 102 | } 103 | 104 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 105 | if (section == 0) { 106 | return self.allDataArray.count; 107 | } else { 108 | return 0; 109 | } 110 | } 111 | 112 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 113 | TodayTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"TodatTableViewCell" forIndexPath:indexPath]; 114 | if (indexPath.section == 0) { 115 | FTWidgetClipModel *clipModel = self.allDataArray[indexPath.row]; 116 | cell.nameLabel.text = clipModel.userName; 117 | cell.timeLabel.text = [self _dealShowTimeWithModelTime: [clipModel.clipTime doubleValue] withNowTime:[[NSDate date] timeIntervalSince1970]]; 118 | cell.belongRow = indexPath.row; 119 | if ([clipModel.isTure isEqualToString:@"True"] ) { 120 | cell.contentLabel.alpha = 1.0; 121 | cell.rightEnterButton.alpha = 1.0; 122 | cell.addBackView.alpha = 0.0; 123 | cell.contentLabel.text = clipModel.content; 124 | } else { 125 | cell.contentLabel.alpha = 0.0; 126 | cell.rightEnterButton.alpha = 0.0; 127 | cell.addBackView.alpha = 1.0; 128 | cell.addContentLabel.text = clipModel.content; 129 | cell.selectionStyle = UITableViewCellSelectionStyleNone; 130 | cell.isShowRight = YES; 131 | } 132 | } 133 | // 点进按钮弹出右边视图(没用block,用的delegate) 134 | cell.delegate = self; 135 | return cell; 136 | } 137 | 138 | // 点击左右视图切换按钮 139 | - (void)transViewAction:(TodayTableViewCell *)todayCell { 140 | if (todayCell.isShowRight == NO) { 141 | [UIView animateWithDuration:kTranAnimationDuration animations:^{ 142 | todayCell.backView.transform = CGAffineTransformTranslate(todayCell.backView.transform, -todayCell.frame.size.width, 0); 143 | todayCell.rightBackView.transform = CGAffineTransformTranslate(todayCell.rightBackView.transform, -todayCell.frame.size.width, 0); 144 | }]; 145 | todayCell.isShowRight = YES; 146 | } else { 147 | [UIView animateWithDuration:kTranAnimationDuration animations:^{ 148 | todayCell.backView.transform = CGAffineTransformTranslate(todayCell.backView.transform, todayCell.frame.size.width, 0); 149 | todayCell.rightBackView.transform = CGAffineTransformTranslate(todayCell.rightBackView.transform, todayCell.frame.size.width, 0); 150 | }]; 151 | todayCell.isShowRight = NO; 152 | } 153 | } 154 | 155 | // 点击More按钮 156 | - (void)enterContainingApp { 157 | [self.extensionContext openURL:[NSURL URLWithString:@"appextension://123"] completionHandler:^(BOOL success) { 158 | NSLog(@"open url result:%d",success); 159 | }]; 160 | } 161 | 162 | // 点击删除按钮 163 | - (void)deleteClipBoardCell:(TodayTableViewCell *)todayCell { 164 | [self.allDataArray removeObjectAtIndex:todayCell.belongRow]; 165 | if (self.allDataArray.count == 0) { 166 | [self.hideStateDic setObject:@"没有复制任何内容" forKey:KHideStateKey]; 167 | } 168 | [self.mainTableView reloadSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:UITableViewRowAnimationFade]; 169 | [self setPreferredContentSize:CGSizeMake(self.view.bounds.size.width, 400-72*(5 - _allDataArray.count))]; 170 | // 删除后记得重新保存数据 171 | [self _saveDataToSanBoxWithDataArray:_allDataArray]; 172 | 173 | } 174 | 175 | // 点击add按钮 176 | - (void)makeTureContent:(TodayTableViewCell *)todayCell { 177 | FTWidgetClipModel *clipModel = self.allDataArray[todayCell.belongRow]; 178 | clipModel.isTure = @"True"; 179 | todayCell.isShowRight = NO; 180 | todayCell.selectionStyle = UITableViewCellSelectionStyleDefault; 181 | [self _saveDataToSanBoxWithDataArray:_allDataArray]; 182 | [self.mainTableView reloadData]; 183 | } 184 | 185 | // 点击发送按钮 186 | - (void)sendClipBoardContent:(TodayTableViewCell *)todayCell { 187 | todayCell.deleteButton.alpha = 0.0; 188 | todayCell.sendButton.alpha = 0.0; 189 | todayCell.moreButton.alpha = 0.0; 190 | 191 | 192 | } 193 | 194 | #pragma mark - UITableViewDelegate Methods 195 | // section头部的height 196 | - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { 197 | if (section == 0) { 198 | return 0; 199 | } else { 200 | return 40; 201 | } 202 | } 203 | 204 | // section头部的view 205 | - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { 206 | if (section == 0) { 207 | return nil; 208 | } else { 209 | UIView *headView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 40)]; 210 | 211 | _headButton.frame = CGRectMake(-48, 0, 240, 40); 212 | [_headButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 213 | _headButton.titleLabel.font = [UIFont systemFontOfSize:12.0]; 214 | [_headButton setTitle:[_hideStateDic objectForKey:KHideStateKey] forState:UIControlStateNormal]; 215 | [_headButton addTarget:self action:@selector(didClickHeadButtonAction:) forControlEvents:UIControlEventTouchUpInside]; 216 | [headView addSubview:_headButton]; 217 | 218 | _leftImageButton.frame = CGRectMake(0, 8, 20, 20); 219 | [_leftImageButton setImage:[UIImage imageNamed:@"up"] forState:UIControlStateNormal]; 220 | [_leftImageButton addTarget:self action:@selector(didClickHeadButtonAction:) forControlEvents:UIControlEventTouchUpInside]; 221 | [headView addSubview:_leftImageButton]; 222 | if ([[self.hideStateDic objectForKey:KHideStateKey] isEqualToString:@"没有复制任何内容"]) { 223 | _leftImageButton.alpha = 0.0; 224 | } else { 225 | _leftImageButton.alpha = 1.0; 226 | } 227 | return headView; 228 | } 229 | } 230 | 231 | - (void)didClickHeadButtonAction:(UIButton *)btn { 232 | [self _showOrHideHeadSectionAction]; 233 | } 234 | 235 | // cell被选中 236 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 237 | // 选中cell后,高亮状态立马就消失 238 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 239 | TodayTableViewCell *cell = (TodayTableViewCell *)[tableView cellForRowAtIndexPath:indexPath]; 240 | // copy的动画效果 241 | if (cell.isShowRight == NO) { 242 | cell.backView.alpha = 0.0; 243 | [UIView animateWithDuration:kCopyAnimationDuration animations:^{ 244 | [UIView animateWithDuration:kCopyAnimationDuration animations:^{ 245 | cell.didCopyLabel.transform = CGAffineTransformMakeScale(1.3, 1.3); 246 | }]; 247 | cell.didCopyLabel.alpha = 1.0; 248 | cell.userInteractionEnabled = NO; 249 | } completion:^(BOOL finished) { 250 | cell.backView.alpha = 1.0; 251 | cell.didCopyLabel.alpha = 0.0; 252 | cell.didCopyLabel.transform = CGAffineTransformIdentity; 253 | cell.userInteractionEnabled = YES; 254 | }]; 255 | UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; 256 | [pasteboard setPersistent:YES]; 257 | pasteboard.string = cell.contentLabel.text; 258 | } else { 259 | cell.selectionStyle = UITableViewCellSelectionStyleNone; 260 | } 261 | } 262 | 263 | #pragma mark - Private Methods 264 | // 显示/隐藏按钮的响应方法 265 | - (void)_showOrHideHeadSectionAction { 266 | if ([[self.hideStateDic objectForKey:KHideStateKey] isEqualToString:@"没有复制任何内容"]) { 267 | } else { 268 | NSUserDefaults *sharedUserDefaults = [[NSUserDefaults alloc] initWithSuiteName:@"group.com.tranfer"]; 269 | if ([[self.hideStateDic objectForKey:KHideStateKey] isEqualToString:@"隐藏最近剪辑"]) { 270 | [self.allDataArray removeAllObjects]; 271 | [UIView animateWithDuration:KUpAndDownAnimationDuration animations:^{ 272 | [self setPreferredContentSize:CGSizeMake(self.view.bounds.size.width, 40)]; 273 | self.leftImageButton.transform = CGAffineTransformRotate(self.leftImageButton.transform, M_PI); 274 | }]; 275 | [self.hideStateDic setObject:@"显示最近剪辑" forKey:KHideStateKey]; 276 | // 记得刷新 277 | [self.mainTableView reloadData]; 278 | } else { 279 | NSData *unarchiverData = [sharedUserDefaults objectForKey:KArchiverKey]; 280 | self.allDataArray = [NSMutableArray arrayWithArray:[NSKeyedUnarchiver unarchiveObjectWithData:unarchiverData]]; 281 | [UIView animateWithDuration:KUpAndDownAnimationDuration animations:^{ 282 | [self setPreferredContentSize:CGSizeMake(self.view.bounds.size.width, 400-72*(5 - _allDataArray.count))]; 283 | self.leftImageButton.transform = CGAffineTransformRotate(self.leftImageButton.transform, M_PI); 284 | }]; 285 | [self.hideStateDic setObject:@"隐藏最近剪辑" forKey:KHideStateKey]; 286 | [self.mainTableView reloadData]; 287 | } 288 | } 289 | } 290 | 291 | // 保存主数据 292 | - (void)_saveDataToSanBoxWithDataArray:(NSMutableArray *)dataArray { 293 | NSUserDefaults *sharedUserDefaults = [[NSUserDefaults alloc] initWithSuiteName:@"group.com.tranfer"]; 294 | NSData *archiverData = [NSKeyedArchiver archivedDataWithRootObject:dataArray]; 295 | [sharedUserDefaults setObject:archiverData forKey:KArchiverKey]; 296 | // 切莫忘记,依旧调用 synchronize 立即写入沙盒中 297 | [sharedUserDefaults synchronize]; 298 | } 299 | 300 | // 保存剪切板最新的记录 301 | - (void)_saveLastClipboard:(NSString *)lastString { 302 | NSUserDefaults *sharedUserDefaults = [[NSUserDefaults alloc] initWithSuiteName:@"group.com.tranfer"]; 303 | NSData *archiverData = [NSKeyedArchiver archivedDataWithRootObject:lastString]; 304 | [sharedUserDefaults setObject:archiverData forKey:KArchiverLastClipKey]; 305 | // 切莫忘记,依旧调用 synchronize 立即写入沙盒中 306 | [sharedUserDefaults synchronize]; 307 | } 308 | 309 | // 时间处理 310 | - (NSString *)_dealShowTimeWithModelTime:(double)oldTime withNowTime:(double)nowTime { 311 | NSString *time = @""; 312 | double gap = (nowTime - oldTime) / 60.0; 313 | if (gap < 1.0) { 314 | time = @"刚刚"; 315 | } else if (gap >= 1.0 && gap < 60) { 316 | time = [NSString stringWithFormat:@"%.0f分钟",gap]; 317 | } else if ( gap >= 60 ) { 318 | time = [NSString stringWithFormat:@"%.0f小时",gap/60]; 319 | } 320 | return time; 321 | } 322 | 323 | - (void)didReceiveMemoryWarning { 324 | [super didReceiveMemoryWarning]; 325 | // Dispose of any resources that can be recreated. 326 | } 327 | 328 | - (void)widgetPerformUpdateWithCompletionHandler:(void (^)(NCUpdateResult))completionHandler { 329 | // Perform any setup necessary in order to update the view. 330 | 331 | // If an error is encountered, use NCUpdateResultFailed 332 | // If there's no update required, use NCUpdateResultNoData 333 | // If there's an update, use NCUpdateResultNewData 334 | NSLog(@"%s", __func__); 335 | completionHandler(NCUpdateResultNewData); 336 | } 337 | 338 | 339 | @end 340 | -------------------------------------------------------------------------------- /FeiTuYunChuan/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TommyFreya/TodayWidget/35322c20c2e945a25409ffe68d9a09eb68c134d6/FeiTuYunChuan/add.png -------------------------------------------------------------------------------- /FeiTuYunChuan/add_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TommyFreya/TodayWidget/35322c20c2e945a25409ffe68d9a09eb68c134d6/FeiTuYunChuan/add_bg.png -------------------------------------------------------------------------------- /FeiTuYunChuan/andriod.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TommyFreya/TodayWidget/35322c20c2e945a25409ffe68d9a09eb68c134d6/FeiTuYunChuan/andriod.png -------------------------------------------------------------------------------- /FeiTuYunChuan/iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TommyFreya/TodayWidget/35322c20c2e945a25409ffe68d9a09eb68c134d6/FeiTuYunChuan/iphone.png -------------------------------------------------------------------------------- /FeiTuYunChuan/left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TommyFreya/TodayWidget/35322c20c2e945a25409ffe68d9a09eb68c134d6/FeiTuYunChuan/left.png -------------------------------------------------------------------------------- /FeiTuYunChuan/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TommyFreya/TodayWidget/35322c20c2e945a25409ffe68d9a09eb68c134d6/FeiTuYunChuan/logo.png -------------------------------------------------------------------------------- /FeiTuYunChuan/mac.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TommyFreya/TodayWidget/35322c20c2e945a25409ffe68d9a09eb68c134d6/FeiTuYunChuan/mac.png -------------------------------------------------------------------------------- /FeiTuYunChuan/pc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TommyFreya/TodayWidget/35322c20c2e945a25409ffe68d9a09eb68c134d6/FeiTuYunChuan/pc.png -------------------------------------------------------------------------------- /FeiTuYunChuan/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TommyFreya/TodayWidget/35322c20c2e945a25409ffe68d9a09eb68c134d6/FeiTuYunChuan/right.png -------------------------------------------------------------------------------- /FeiTuYunChuan/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TommyFreya/TodayWidget/35322c20c2e945a25409ffe68d9a09eb68c134d6/FeiTuYunChuan/up.png -------------------------------------------------------------------------------- /MyWidget.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | A74431F91A00CBA600126394 /* FTWidgetClipModel.m in Sources */ = {isa = PBXBuildFile; fileRef = A74431F81A00CBA600126394 /* FTWidgetClipModel.m */; }; 11 | A755415019FFEEA00048D9FA /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A755414B19FFEEA00048D9FA /* MainInterface.storyboard */; }; 12 | A755415119FFEEA00048D9FA /* TodayTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A755414D19FFEEA00048D9FA /* TodayTableViewCell.m */; }; 13 | A755415219FFEEA00048D9FA /* TodayViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A755414F19FFEEA00048D9FA /* TodayViewController.m */; }; 14 | A77001971A0212F1008A97A5 /* add_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = A770018D1A0212F1008A97A5 /* add_bg.png */; }; 15 | A77001981A0212F1008A97A5 /* add.png in Resources */ = {isa = PBXBuildFile; fileRef = A770018E1A0212F1008A97A5 /* add.png */; }; 16 | A77001991A0212F1008A97A5 /* andriod.png in Resources */ = {isa = PBXBuildFile; fileRef = A770018F1A0212F1008A97A5 /* andriod.png */; }; 17 | A770019A1A0212F1008A97A5 /* iphone.png in Resources */ = {isa = PBXBuildFile; fileRef = A77001901A0212F1008A97A5 /* iphone.png */; }; 18 | A770019B1A0212F1008A97A5 /* left.png in Resources */ = {isa = PBXBuildFile; fileRef = A77001911A0212F1008A97A5 /* left.png */; }; 19 | A770019C1A0212F1008A97A5 /* logo.png in Resources */ = {isa = PBXBuildFile; fileRef = A77001921A0212F1008A97A5 /* logo.png */; }; 20 | A770019D1A0212F1008A97A5 /* mac.png in Resources */ = {isa = PBXBuildFile; fileRef = A77001931A0212F1008A97A5 /* mac.png */; }; 21 | A770019E1A0212F1008A97A5 /* pc.png in Resources */ = {isa = PBXBuildFile; fileRef = A77001941A0212F1008A97A5 /* pc.png */; }; 22 | A770019F1A0212F1008A97A5 /* right.png in Resources */ = {isa = PBXBuildFile; fileRef = A77001951A0212F1008A97A5 /* right.png */; }; 23 | A77001A01A0212F1008A97A5 /* up.png in Resources */ = {isa = PBXBuildFile; fileRef = A77001961A0212F1008A97A5 /* up.png */; }; 24 | A7C5AB5C19FFDADF00E702B6 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = A7C5AB5B19FFDADF00E702B6 /* main.m */; }; 25 | A7C5AB5F19FFDADF00E702B6 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = A7C5AB5E19FFDADF00E702B6 /* AppDelegate.m */; }; 26 | A7C5AB6219FFDADF00E702B6 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A7C5AB6119FFDADF00E702B6 /* ViewController.m */; }; 27 | A7C5AB6519FFDADF00E702B6 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A7C5AB6319FFDADF00E702B6 /* Main.storyboard */; }; 28 | A7C5AB6719FFDADF00E702B6 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A7C5AB6619FFDADF00E702B6 /* Images.xcassets */; }; 29 | A7C5AB6A19FFDADF00E702B6 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = A7C5AB6819FFDADF00E702B6 /* LaunchScreen.xib */; }; 30 | A7C5AB7619FFDADF00E702B6 /* MyWidgetTests.m in Sources */ = {isa = PBXBuildFile; fileRef = A7C5AB7519FFDADF00E702B6 /* MyWidgetTests.m */; }; 31 | A7C5AB8619FFDAFE00E702B6 /* NotificationCenter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7C5AB8519FFDAFE00E702B6 /* NotificationCenter.framework */; }; 32 | A7C5AB9119FFDAFE00E702B6 /* FeiTuYunChuan.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = A7C5AB8319FFDAFE00E702B6 /* FeiTuYunChuan.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 33 | /* End PBXBuildFile section */ 34 | 35 | /* Begin PBXContainerItemProxy section */ 36 | A7C5AB7019FFDADF00E702B6 /* PBXContainerItemProxy */ = { 37 | isa = PBXContainerItemProxy; 38 | containerPortal = A7C5AB4E19FFDADF00E702B6 /* Project object */; 39 | proxyType = 1; 40 | remoteGlobalIDString = A7C5AB5519FFDADF00E702B6; 41 | remoteInfo = MyWidget; 42 | }; 43 | A7C5AB8F19FFDAFE00E702B6 /* PBXContainerItemProxy */ = { 44 | isa = PBXContainerItemProxy; 45 | containerPortal = A7C5AB4E19FFDADF00E702B6 /* Project object */; 46 | proxyType = 1; 47 | remoteGlobalIDString = A7C5AB8219FFDAFE00E702B6; 48 | remoteInfo = FeiTuYunChuan; 49 | }; 50 | /* End PBXContainerItemProxy section */ 51 | 52 | /* Begin PBXCopyFilesBuildPhase section */ 53 | A7C5AB9519FFDAFE00E702B6 /* Embed App Extensions */ = { 54 | isa = PBXCopyFilesBuildPhase; 55 | buildActionMask = 2147483647; 56 | dstPath = ""; 57 | dstSubfolderSpec = 13; 58 | files = ( 59 | A7C5AB9119FFDAFE00E702B6 /* FeiTuYunChuan.appex in Embed App Extensions */, 60 | ); 61 | name = "Embed App Extensions"; 62 | runOnlyForDeploymentPostprocessing = 0; 63 | }; 64 | /* End PBXCopyFilesBuildPhase section */ 65 | 66 | /* Begin PBXFileReference section */ 67 | A74431F71A00CBA600126394 /* FTWidgetClipModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FTWidgetClipModel.h; sourceTree = ""; }; 68 | A74431F81A00CBA600126394 /* FTWidgetClipModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FTWidgetClipModel.m; sourceTree = ""; }; 69 | A755414B19FFEEA00048D9FA /* MainInterface.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = MainInterface.storyboard; sourceTree = ""; }; 70 | A755414C19FFEEA00048D9FA /* TodayTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TodayTableViewCell.h; sourceTree = ""; }; 71 | A755414D19FFEEA00048D9FA /* TodayTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TodayTableViewCell.m; sourceTree = ""; }; 72 | A755414E19FFEEA00048D9FA /* TodayViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TodayViewController.h; sourceTree = ""; }; 73 | A755414F19FFEEA00048D9FA /* TodayViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TodayViewController.m; sourceTree = ""; }; 74 | A770018D1A0212F1008A97A5 /* add_bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = add_bg.png; sourceTree = ""; }; 75 | A770018E1A0212F1008A97A5 /* add.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = add.png; sourceTree = ""; }; 76 | A770018F1A0212F1008A97A5 /* andriod.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = andriod.png; sourceTree = ""; }; 77 | A77001901A0212F1008A97A5 /* iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = iphone.png; sourceTree = ""; }; 78 | A77001911A0212F1008A97A5 /* left.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = left.png; sourceTree = ""; }; 79 | A77001921A0212F1008A97A5 /* logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo.png; sourceTree = ""; }; 80 | A77001931A0212F1008A97A5 /* mac.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = mac.png; sourceTree = ""; }; 81 | A77001941A0212F1008A97A5 /* pc.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = pc.png; sourceTree = ""; }; 82 | A77001951A0212F1008A97A5 /* right.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = right.png; sourceTree = ""; }; 83 | A77001961A0212F1008A97A5 /* up.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = up.png; sourceTree = ""; }; 84 | A77AB9401A00E16F0063E489 /* MyWidget.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = MyWidget.entitlements; sourceTree = ""; }; 85 | A77AB9411A00E1780063E489 /* FeiTuYunChuan.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = FeiTuYunChuan.entitlements; sourceTree = ""; }; 86 | A7C5AB5619FFDADF00E702B6 /* MyWidget.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MyWidget.app; sourceTree = BUILT_PRODUCTS_DIR; }; 87 | A7C5AB5A19FFDADF00E702B6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 88 | A7C5AB5B19FFDADF00E702B6 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 89 | A7C5AB5D19FFDADF00E702B6 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 90 | A7C5AB5E19FFDADF00E702B6 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 91 | A7C5AB6019FFDADF00E702B6 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 92 | A7C5AB6119FFDADF00E702B6 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 93 | A7C5AB6419FFDADF00E702B6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 94 | A7C5AB6619FFDADF00E702B6 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 95 | A7C5AB6919FFDADF00E702B6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 96 | A7C5AB6F19FFDADF00E702B6 /* MyWidgetTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MyWidgetTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 97 | A7C5AB7419FFDADF00E702B6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 98 | A7C5AB7519FFDADF00E702B6 /* MyWidgetTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyWidgetTests.m; sourceTree = ""; }; 99 | A7C5AB8319FFDAFE00E702B6 /* FeiTuYunChuan.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = FeiTuYunChuan.appex; sourceTree = BUILT_PRODUCTS_DIR; }; 100 | A7C5AB8519FFDAFE00E702B6 /* NotificationCenter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NotificationCenter.framework; path = System/Library/Frameworks/NotificationCenter.framework; sourceTree = SDKROOT; }; 101 | A7C5AB8919FFDAFE00E702B6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 102 | /* End PBXFileReference section */ 103 | 104 | /* Begin PBXFrameworksBuildPhase section */ 105 | A7C5AB5319FFDADF00E702B6 /* Frameworks */ = { 106 | isa = PBXFrameworksBuildPhase; 107 | buildActionMask = 2147483647; 108 | files = ( 109 | ); 110 | runOnlyForDeploymentPostprocessing = 0; 111 | }; 112 | A7C5AB6C19FFDADF00E702B6 /* Frameworks */ = { 113 | isa = PBXFrameworksBuildPhase; 114 | buildActionMask = 2147483647; 115 | files = ( 116 | ); 117 | runOnlyForDeploymentPostprocessing = 0; 118 | }; 119 | A7C5AB8019FFDAFE00E702B6 /* Frameworks */ = { 120 | isa = PBXFrameworksBuildPhase; 121 | buildActionMask = 2147483647; 122 | files = ( 123 | A7C5AB8619FFDAFE00E702B6 /* NotificationCenter.framework in Frameworks */, 124 | ); 125 | runOnlyForDeploymentPostprocessing = 0; 126 | }; 127 | /* End PBXFrameworksBuildPhase section */ 128 | 129 | /* Begin PBXGroup section */ 130 | A7C5AB4D19FFDADF00E702B6 = { 131 | isa = PBXGroup; 132 | children = ( 133 | A7C5AB5819FFDADF00E702B6 /* MyWidget */, 134 | A7C5AB7219FFDADF00E702B6 /* MyWidgetTests */, 135 | A7C5AB8719FFDAFE00E702B6 /* FeiTuYunChuan */, 136 | A7C5AB8419FFDAFE00E702B6 /* Frameworks */, 137 | A7C5AB5719FFDADF00E702B6 /* Products */, 138 | ); 139 | sourceTree = ""; 140 | }; 141 | A7C5AB5719FFDADF00E702B6 /* Products */ = { 142 | isa = PBXGroup; 143 | children = ( 144 | A7C5AB5619FFDADF00E702B6 /* MyWidget.app */, 145 | A7C5AB6F19FFDADF00E702B6 /* MyWidgetTests.xctest */, 146 | A7C5AB8319FFDAFE00E702B6 /* FeiTuYunChuan.appex */, 147 | ); 148 | name = Products; 149 | sourceTree = ""; 150 | }; 151 | A7C5AB5819FFDADF00E702B6 /* MyWidget */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | A77AB9401A00E16F0063E489 /* MyWidget.entitlements */, 155 | A7C5AB5D19FFDADF00E702B6 /* AppDelegate.h */, 156 | A7C5AB5E19FFDADF00E702B6 /* AppDelegate.m */, 157 | A7C5AB6019FFDADF00E702B6 /* ViewController.h */, 158 | A7C5AB6119FFDADF00E702B6 /* ViewController.m */, 159 | A7C5AB6319FFDADF00E702B6 /* Main.storyboard */, 160 | A7C5AB6619FFDADF00E702B6 /* Images.xcassets */, 161 | A7C5AB6819FFDADF00E702B6 /* LaunchScreen.xib */, 162 | A7C5AB5919FFDADF00E702B6 /* Supporting Files */, 163 | ); 164 | path = MyWidget; 165 | sourceTree = ""; 166 | }; 167 | A7C5AB5919FFDADF00E702B6 /* Supporting Files */ = { 168 | isa = PBXGroup; 169 | children = ( 170 | A7C5AB5A19FFDADF00E702B6 /* Info.plist */, 171 | A7C5AB5B19FFDADF00E702B6 /* main.m */, 172 | ); 173 | name = "Supporting Files"; 174 | sourceTree = ""; 175 | }; 176 | A7C5AB7219FFDADF00E702B6 /* MyWidgetTests */ = { 177 | isa = PBXGroup; 178 | children = ( 179 | A7C5AB7519FFDADF00E702B6 /* MyWidgetTests.m */, 180 | A7C5AB7319FFDADF00E702B6 /* Supporting Files */, 181 | ); 182 | path = MyWidgetTests; 183 | sourceTree = ""; 184 | }; 185 | A7C5AB7319FFDADF00E702B6 /* Supporting Files */ = { 186 | isa = PBXGroup; 187 | children = ( 188 | A7C5AB7419FFDADF00E702B6 /* Info.plist */, 189 | ); 190 | name = "Supporting Files"; 191 | sourceTree = ""; 192 | }; 193 | A7C5AB8419FFDAFE00E702B6 /* Frameworks */ = { 194 | isa = PBXGroup; 195 | children = ( 196 | A7C5AB8519FFDAFE00E702B6 /* NotificationCenter.framework */, 197 | ); 198 | name = Frameworks; 199 | sourceTree = ""; 200 | }; 201 | A7C5AB8719FFDAFE00E702B6 /* FeiTuYunChuan */ = { 202 | isa = PBXGroup; 203 | children = ( 204 | A77AB9411A00E1780063E489 /* FeiTuYunChuan.entitlements */, 205 | A755414B19FFEEA00048D9FA /* MainInterface.storyboard */, 206 | A755414E19FFEEA00048D9FA /* TodayViewController.h */, 207 | A755414F19FFEEA00048D9FA /* TodayViewController.m */, 208 | A755414C19FFEEA00048D9FA /* TodayTableViewCell.h */, 209 | A755414D19FFEEA00048D9FA /* TodayTableViewCell.m */, 210 | A74431F71A00CBA600126394 /* FTWidgetClipModel.h */, 211 | A74431F81A00CBA600126394 /* FTWidgetClipModel.m */, 212 | A7C5AB8819FFDAFE00E702B6 /* Supporting Files */, 213 | ); 214 | path = FeiTuYunChuan; 215 | sourceTree = ""; 216 | }; 217 | A7C5AB8819FFDAFE00E702B6 /* Supporting Files */ = { 218 | isa = PBXGroup; 219 | children = ( 220 | A770018D1A0212F1008A97A5 /* add_bg.png */, 221 | A770018E1A0212F1008A97A5 /* add.png */, 222 | A770018F1A0212F1008A97A5 /* andriod.png */, 223 | A77001901A0212F1008A97A5 /* iphone.png */, 224 | A77001911A0212F1008A97A5 /* left.png */, 225 | A77001921A0212F1008A97A5 /* logo.png */, 226 | A77001931A0212F1008A97A5 /* mac.png */, 227 | A77001941A0212F1008A97A5 /* pc.png */, 228 | A77001951A0212F1008A97A5 /* right.png */, 229 | A77001961A0212F1008A97A5 /* up.png */, 230 | A7C5AB8919FFDAFE00E702B6 /* Info.plist */, 231 | ); 232 | name = "Supporting Files"; 233 | sourceTree = ""; 234 | }; 235 | /* End PBXGroup section */ 236 | 237 | /* Begin PBXNativeTarget section */ 238 | A7C5AB5519FFDADF00E702B6 /* MyWidget */ = { 239 | isa = PBXNativeTarget; 240 | buildConfigurationList = A7C5AB7919FFDADF00E702B6 /* Build configuration list for PBXNativeTarget "MyWidget" */; 241 | buildPhases = ( 242 | A7C5AB5219FFDADF00E702B6 /* Sources */, 243 | A7C5AB5319FFDADF00E702B6 /* Frameworks */, 244 | A7C5AB5419FFDADF00E702B6 /* Resources */, 245 | A7C5AB9519FFDAFE00E702B6 /* Embed App Extensions */, 246 | ); 247 | buildRules = ( 248 | ); 249 | dependencies = ( 250 | A7C5AB9019FFDAFE00E702B6 /* PBXTargetDependency */, 251 | ); 252 | name = MyWidget; 253 | productName = MyWidget; 254 | productReference = A7C5AB5619FFDADF00E702B6 /* MyWidget.app */; 255 | productType = "com.apple.product-type.application"; 256 | }; 257 | A7C5AB6E19FFDADF00E702B6 /* MyWidgetTests */ = { 258 | isa = PBXNativeTarget; 259 | buildConfigurationList = A7C5AB7C19FFDADF00E702B6 /* Build configuration list for PBXNativeTarget "MyWidgetTests" */; 260 | buildPhases = ( 261 | A7C5AB6B19FFDADF00E702B6 /* Sources */, 262 | A7C5AB6C19FFDADF00E702B6 /* Frameworks */, 263 | A7C5AB6D19FFDADF00E702B6 /* Resources */, 264 | ); 265 | buildRules = ( 266 | ); 267 | dependencies = ( 268 | A7C5AB7119FFDADF00E702B6 /* PBXTargetDependency */, 269 | ); 270 | name = MyWidgetTests; 271 | productName = MyWidgetTests; 272 | productReference = A7C5AB6F19FFDADF00E702B6 /* MyWidgetTests.xctest */; 273 | productType = "com.apple.product-type.bundle.unit-test"; 274 | }; 275 | A7C5AB8219FFDAFE00E702B6 /* FeiTuYunChuan */ = { 276 | isa = PBXNativeTarget; 277 | buildConfigurationList = A7C5AB9219FFDAFE00E702B6 /* Build configuration list for PBXNativeTarget "FeiTuYunChuan" */; 278 | buildPhases = ( 279 | A7C5AB7F19FFDAFE00E702B6 /* Sources */, 280 | A7C5AB8019FFDAFE00E702B6 /* Frameworks */, 281 | A7C5AB8119FFDAFE00E702B6 /* Resources */, 282 | ); 283 | buildRules = ( 284 | ); 285 | dependencies = ( 286 | ); 287 | name = FeiTuYunChuan; 288 | productName = FeiTuYunChuan; 289 | productReference = A7C5AB8319FFDAFE00E702B6 /* FeiTuYunChuan.appex */; 290 | productType = "com.apple.product-type.app-extension"; 291 | }; 292 | /* End PBXNativeTarget section */ 293 | 294 | /* Begin PBXProject section */ 295 | A7C5AB4E19FFDADF00E702B6 /* Project object */ = { 296 | isa = PBXProject; 297 | attributes = { 298 | LastUpgradeCheck = 0610; 299 | ORGANIZATIONNAME = MTH; 300 | TargetAttributes = { 301 | A7C5AB5519FFDADF00E702B6 = { 302 | CreatedOnToolsVersion = 6.1; 303 | DevelopmentTeam = AA56B6R4CW; 304 | SystemCapabilities = { 305 | com.apple.ApplicationGroups.iOS = { 306 | enabled = 1; 307 | }; 308 | }; 309 | }; 310 | A7C5AB6E19FFDADF00E702B6 = { 311 | CreatedOnToolsVersion = 6.1; 312 | TestTargetID = A7C5AB5519FFDADF00E702B6; 313 | }; 314 | A7C5AB8219FFDAFE00E702B6 = { 315 | CreatedOnToolsVersion = 6.1; 316 | DevelopmentTeam = AA56B6R4CW; 317 | SystemCapabilities = { 318 | com.apple.ApplicationGroups.iOS = { 319 | enabled = 1; 320 | }; 321 | }; 322 | }; 323 | }; 324 | }; 325 | buildConfigurationList = A7C5AB5119FFDADF00E702B6 /* Build configuration list for PBXProject "MyWidget" */; 326 | compatibilityVersion = "Xcode 3.2"; 327 | developmentRegion = English; 328 | hasScannedForEncodings = 0; 329 | knownRegions = ( 330 | en, 331 | Base, 332 | ); 333 | mainGroup = A7C5AB4D19FFDADF00E702B6; 334 | productRefGroup = A7C5AB5719FFDADF00E702B6 /* Products */; 335 | projectDirPath = ""; 336 | projectRoot = ""; 337 | targets = ( 338 | A7C5AB5519FFDADF00E702B6 /* MyWidget */, 339 | A7C5AB6E19FFDADF00E702B6 /* MyWidgetTests */, 340 | A7C5AB8219FFDAFE00E702B6 /* FeiTuYunChuan */, 341 | ); 342 | }; 343 | /* End PBXProject section */ 344 | 345 | /* Begin PBXResourcesBuildPhase section */ 346 | A7C5AB5419FFDADF00E702B6 /* Resources */ = { 347 | isa = PBXResourcesBuildPhase; 348 | buildActionMask = 2147483647; 349 | files = ( 350 | A7C5AB6519FFDADF00E702B6 /* Main.storyboard in Resources */, 351 | A7C5AB6A19FFDADF00E702B6 /* LaunchScreen.xib in Resources */, 352 | A7C5AB6719FFDADF00E702B6 /* Images.xcassets in Resources */, 353 | ); 354 | runOnlyForDeploymentPostprocessing = 0; 355 | }; 356 | A7C5AB6D19FFDADF00E702B6 /* Resources */ = { 357 | isa = PBXResourcesBuildPhase; 358 | buildActionMask = 2147483647; 359 | files = ( 360 | ); 361 | runOnlyForDeploymentPostprocessing = 0; 362 | }; 363 | A7C5AB8119FFDAFE00E702B6 /* Resources */ = { 364 | isa = PBXResourcesBuildPhase; 365 | buildActionMask = 2147483647; 366 | files = ( 367 | A770019F1A0212F1008A97A5 /* right.png in Resources */, 368 | A77001981A0212F1008A97A5 /* add.png in Resources */, 369 | A77001971A0212F1008A97A5 /* add_bg.png in Resources */, 370 | A770019B1A0212F1008A97A5 /* left.png in Resources */, 371 | A770019D1A0212F1008A97A5 /* mac.png in Resources */, 372 | A770019A1A0212F1008A97A5 /* iphone.png in Resources */, 373 | A770019C1A0212F1008A97A5 /* logo.png in Resources */, 374 | A77001A01A0212F1008A97A5 /* up.png in Resources */, 375 | A755415019FFEEA00048D9FA /* MainInterface.storyboard in Resources */, 376 | A77001991A0212F1008A97A5 /* andriod.png in Resources */, 377 | A770019E1A0212F1008A97A5 /* pc.png in Resources */, 378 | ); 379 | runOnlyForDeploymentPostprocessing = 0; 380 | }; 381 | /* End PBXResourcesBuildPhase section */ 382 | 383 | /* Begin PBXSourcesBuildPhase section */ 384 | A7C5AB5219FFDADF00E702B6 /* Sources */ = { 385 | isa = PBXSourcesBuildPhase; 386 | buildActionMask = 2147483647; 387 | files = ( 388 | A7C5AB6219FFDADF00E702B6 /* ViewController.m in Sources */, 389 | A7C5AB5F19FFDADF00E702B6 /* AppDelegate.m in Sources */, 390 | A7C5AB5C19FFDADF00E702B6 /* main.m in Sources */, 391 | ); 392 | runOnlyForDeploymentPostprocessing = 0; 393 | }; 394 | A7C5AB6B19FFDADF00E702B6 /* Sources */ = { 395 | isa = PBXSourcesBuildPhase; 396 | buildActionMask = 2147483647; 397 | files = ( 398 | A7C5AB7619FFDADF00E702B6 /* MyWidgetTests.m in Sources */, 399 | ); 400 | runOnlyForDeploymentPostprocessing = 0; 401 | }; 402 | A7C5AB7F19FFDAFE00E702B6 /* Sources */ = { 403 | isa = PBXSourcesBuildPhase; 404 | buildActionMask = 2147483647; 405 | files = ( 406 | A755415219FFEEA00048D9FA /* TodayViewController.m in Sources */, 407 | A755415119FFEEA00048D9FA /* TodayTableViewCell.m in Sources */, 408 | A74431F91A00CBA600126394 /* FTWidgetClipModel.m in Sources */, 409 | ); 410 | runOnlyForDeploymentPostprocessing = 0; 411 | }; 412 | /* End PBXSourcesBuildPhase section */ 413 | 414 | /* Begin PBXTargetDependency section */ 415 | A7C5AB7119FFDADF00E702B6 /* PBXTargetDependency */ = { 416 | isa = PBXTargetDependency; 417 | target = A7C5AB5519FFDADF00E702B6 /* MyWidget */; 418 | targetProxy = A7C5AB7019FFDADF00E702B6 /* PBXContainerItemProxy */; 419 | }; 420 | A7C5AB9019FFDAFE00E702B6 /* PBXTargetDependency */ = { 421 | isa = PBXTargetDependency; 422 | target = A7C5AB8219FFDAFE00E702B6 /* FeiTuYunChuan */; 423 | targetProxy = A7C5AB8F19FFDAFE00E702B6 /* PBXContainerItemProxy */; 424 | }; 425 | /* End PBXTargetDependency section */ 426 | 427 | /* Begin PBXVariantGroup section */ 428 | A7C5AB6319FFDADF00E702B6 /* Main.storyboard */ = { 429 | isa = PBXVariantGroup; 430 | children = ( 431 | A7C5AB6419FFDADF00E702B6 /* Base */, 432 | ); 433 | name = Main.storyboard; 434 | sourceTree = ""; 435 | }; 436 | A7C5AB6819FFDADF00E702B6 /* LaunchScreen.xib */ = { 437 | isa = PBXVariantGroup; 438 | children = ( 439 | A7C5AB6919FFDADF00E702B6 /* Base */, 440 | ); 441 | name = LaunchScreen.xib; 442 | sourceTree = ""; 443 | }; 444 | /* End PBXVariantGroup section */ 445 | 446 | /* Begin XCBuildConfiguration section */ 447 | A7C5AB7719FFDADF00E702B6 /* Debug */ = { 448 | isa = XCBuildConfiguration; 449 | buildSettings = { 450 | ALWAYS_SEARCH_USER_PATHS = NO; 451 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 452 | CLANG_CXX_LIBRARY = "libc++"; 453 | CLANG_ENABLE_MODULES = YES; 454 | CLANG_ENABLE_OBJC_ARC = YES; 455 | CLANG_WARN_BOOL_CONVERSION = YES; 456 | CLANG_WARN_CONSTANT_CONVERSION = YES; 457 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 458 | CLANG_WARN_EMPTY_BODY = YES; 459 | CLANG_WARN_ENUM_CONVERSION = YES; 460 | CLANG_WARN_INT_CONVERSION = YES; 461 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 462 | CLANG_WARN_UNREACHABLE_CODE = YES; 463 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 464 | CODE_SIGN_ENTITLEMENTS = ""; 465 | CODE_SIGN_IDENTITY = "iPhone Developer: kaihong luo (H536M777VC)"; 466 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 467 | COPY_PHASE_STRIP = NO; 468 | ENABLE_STRICT_OBJC_MSGSEND = YES; 469 | GCC_C_LANGUAGE_STANDARD = gnu99; 470 | GCC_DYNAMIC_NO_PIC = NO; 471 | GCC_OPTIMIZATION_LEVEL = 0; 472 | GCC_PREPROCESSOR_DEFINITIONS = ( 473 | "DEBUG=1", 474 | "$(inherited)", 475 | ); 476 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 477 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 478 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 479 | GCC_WARN_UNDECLARED_SELECTOR = YES; 480 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 481 | GCC_WARN_UNUSED_FUNCTION = YES; 482 | GCC_WARN_UNUSED_VARIABLE = YES; 483 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 484 | MTL_ENABLE_DEBUG_INFO = YES; 485 | ONLY_ACTIVE_ARCH = YES; 486 | PROVISIONING_PROFILE = "6a47188d-bfdb-4058-b1b9-6bba088396c8"; 487 | SDKROOT = iphoneos; 488 | }; 489 | name = Debug; 490 | }; 491 | A7C5AB7819FFDADF00E702B6 /* Release */ = { 492 | isa = XCBuildConfiguration; 493 | buildSettings = { 494 | ALWAYS_SEARCH_USER_PATHS = NO; 495 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 496 | CLANG_CXX_LIBRARY = "libc++"; 497 | CLANG_ENABLE_MODULES = YES; 498 | CLANG_ENABLE_OBJC_ARC = YES; 499 | CLANG_WARN_BOOL_CONVERSION = YES; 500 | CLANG_WARN_CONSTANT_CONVERSION = YES; 501 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 502 | CLANG_WARN_EMPTY_BODY = YES; 503 | CLANG_WARN_ENUM_CONVERSION = YES; 504 | CLANG_WARN_INT_CONVERSION = YES; 505 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 506 | CLANG_WARN_UNREACHABLE_CODE = YES; 507 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 508 | CODE_SIGN_ENTITLEMENTS = ""; 509 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 510 | COPY_PHASE_STRIP = YES; 511 | ENABLE_NS_ASSERTIONS = NO; 512 | ENABLE_STRICT_OBJC_MSGSEND = YES; 513 | GCC_C_LANGUAGE_STANDARD = gnu99; 514 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 515 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 516 | GCC_WARN_UNDECLARED_SELECTOR = YES; 517 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 518 | GCC_WARN_UNUSED_FUNCTION = YES; 519 | GCC_WARN_UNUSED_VARIABLE = YES; 520 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 521 | MTL_ENABLE_DEBUG_INFO = NO; 522 | PROVISIONING_PROFILE = "6a47188d-bfdb-4058-b1b9-6bba088396c8"; 523 | SDKROOT = iphoneos; 524 | VALIDATE_PRODUCT = YES; 525 | }; 526 | name = Release; 527 | }; 528 | A7C5AB7A19FFDADF00E702B6 /* Debug */ = { 529 | isa = XCBuildConfiguration; 530 | buildSettings = { 531 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 532 | CODE_SIGN_ENTITLEMENTS = MyWidget/MyWidget.entitlements; 533 | CODE_SIGN_IDENTITY = "iPhone Developer"; 534 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 535 | INFOPLIST_FILE = MyWidget/Info.plist; 536 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 537 | PRODUCT_NAME = "$(TARGET_NAME)"; 538 | PROVISIONING_PROFILE = ""; 539 | }; 540 | name = Debug; 541 | }; 542 | A7C5AB7B19FFDADF00E702B6 /* Release */ = { 543 | isa = XCBuildConfiguration; 544 | buildSettings = { 545 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 546 | CODE_SIGN_ENTITLEMENTS = MyWidget/MyWidget.entitlements; 547 | CODE_SIGN_IDENTITY = "iPhone Developer"; 548 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 549 | INFOPLIST_FILE = MyWidget/Info.plist; 550 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 551 | PRODUCT_NAME = "$(TARGET_NAME)"; 552 | PROVISIONING_PROFILE = ""; 553 | }; 554 | name = Release; 555 | }; 556 | A7C5AB7D19FFDADF00E702B6 /* Debug */ = { 557 | isa = XCBuildConfiguration; 558 | buildSettings = { 559 | BUNDLE_LOADER = "$(TEST_HOST)"; 560 | FRAMEWORK_SEARCH_PATHS = ( 561 | "$(SDKROOT)/Developer/Library/Frameworks", 562 | "$(inherited)", 563 | ); 564 | GCC_PREPROCESSOR_DEFINITIONS = ( 565 | "DEBUG=1", 566 | "$(inherited)", 567 | ); 568 | INFOPLIST_FILE = MyWidgetTests/Info.plist; 569 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 570 | PRODUCT_NAME = "$(TARGET_NAME)"; 571 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MyWidget.app/MyWidget"; 572 | }; 573 | name = Debug; 574 | }; 575 | A7C5AB7E19FFDADF00E702B6 /* Release */ = { 576 | isa = XCBuildConfiguration; 577 | buildSettings = { 578 | BUNDLE_LOADER = "$(TEST_HOST)"; 579 | FRAMEWORK_SEARCH_PATHS = ( 580 | "$(SDKROOT)/Developer/Library/Frameworks", 581 | "$(inherited)", 582 | ); 583 | INFOPLIST_FILE = MyWidgetTests/Info.plist; 584 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 585 | PRODUCT_NAME = "$(TARGET_NAME)"; 586 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MyWidget.app/MyWidget"; 587 | }; 588 | name = Release; 589 | }; 590 | A7C5AB9319FFDAFE00E702B6 /* Debug */ = { 591 | isa = XCBuildConfiguration; 592 | buildSettings = { 593 | CODE_SIGN_ENTITLEMENTS = FeiTuYunChuan/FeiTuYunChuan.entitlements; 594 | CODE_SIGN_IDENTITY = "iPhone Developer"; 595 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 596 | GCC_PREPROCESSOR_DEFINITIONS = ( 597 | "DEBUG=1", 598 | "$(inherited)", 599 | ); 600 | INFOPLIST_FILE = FeiTuYunChuan/Info.plist; 601 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; 602 | PRODUCT_NAME = "$(TARGET_NAME)"; 603 | PROVISIONING_PROFILE = ""; 604 | SKIP_INSTALL = YES; 605 | }; 606 | name = Debug; 607 | }; 608 | A7C5AB9419FFDAFE00E702B6 /* Release */ = { 609 | isa = XCBuildConfiguration; 610 | buildSettings = { 611 | CODE_SIGN_ENTITLEMENTS = FeiTuYunChuan/FeiTuYunChuan.entitlements; 612 | CODE_SIGN_IDENTITY = "iPhone Developer"; 613 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 614 | INFOPLIST_FILE = FeiTuYunChuan/Info.plist; 615 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; 616 | PRODUCT_NAME = "$(TARGET_NAME)"; 617 | PROVISIONING_PROFILE = ""; 618 | SKIP_INSTALL = YES; 619 | }; 620 | name = Release; 621 | }; 622 | /* End XCBuildConfiguration section */ 623 | 624 | /* Begin XCConfigurationList section */ 625 | A7C5AB5119FFDADF00E702B6 /* Build configuration list for PBXProject "MyWidget" */ = { 626 | isa = XCConfigurationList; 627 | buildConfigurations = ( 628 | A7C5AB7719FFDADF00E702B6 /* Debug */, 629 | A7C5AB7819FFDADF00E702B6 /* Release */, 630 | ); 631 | defaultConfigurationIsVisible = 0; 632 | defaultConfigurationName = Release; 633 | }; 634 | A7C5AB7919FFDADF00E702B6 /* Build configuration list for PBXNativeTarget "MyWidget" */ = { 635 | isa = XCConfigurationList; 636 | buildConfigurations = ( 637 | A7C5AB7A19FFDADF00E702B6 /* Debug */, 638 | A7C5AB7B19FFDADF00E702B6 /* Release */, 639 | ); 640 | defaultConfigurationIsVisible = 0; 641 | defaultConfigurationName = Release; 642 | }; 643 | A7C5AB7C19FFDADF00E702B6 /* Build configuration list for PBXNativeTarget "MyWidgetTests" */ = { 644 | isa = XCConfigurationList; 645 | buildConfigurations = ( 646 | A7C5AB7D19FFDADF00E702B6 /* Debug */, 647 | A7C5AB7E19FFDADF00E702B6 /* Release */, 648 | ); 649 | defaultConfigurationIsVisible = 0; 650 | defaultConfigurationName = Release; 651 | }; 652 | A7C5AB9219FFDAFE00E702B6 /* Build configuration list for PBXNativeTarget "FeiTuYunChuan" */ = { 653 | isa = XCConfigurationList; 654 | buildConfigurations = ( 655 | A7C5AB9319FFDAFE00E702B6 /* Debug */, 656 | A7C5AB9419FFDAFE00E702B6 /* Release */, 657 | ); 658 | defaultConfigurationIsVisible = 0; 659 | defaultConfigurationName = Release; 660 | }; 661 | /* End XCConfigurationList section */ 662 | }; 663 | rootObject = A7C5AB4E19FFDADF00E702B6 /* Project object */; 664 | } 665 | -------------------------------------------------------------------------------- /MyWidget.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /MyWidget.xcodeproj/xcuserdata/humingtao.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /MyWidget.xcodeproj/xcuserdata/humingtao.xcuserdatad/xcschemes/FeiTuYunChuan.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 6 | 9 | 10 | 16 | 22 | 23 | 24 | 30 | 36 | 37 | 38 | 39 | 40 | 45 | 46 | 47 | 48 | 54 | 55 | 56 | 57 | 67 | 68 | 74 | 75 | 76 | 77 | 78 | 79 | 86 | 87 | 93 | 94 | 95 | 96 | 98 | 99 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /MyWidget.xcodeproj/xcuserdata/humingtao.xcuserdatad/xcschemes/MyWidget.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 94 | 100 | 101 | 102 | 103 | 105 | 106 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /MyWidget.xcodeproj/xcuserdata/humingtao.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | FeiTuYunChuan.xcscheme 8 | 9 | orderHint 10 | 1 11 | 12 | MyWidget.xcscheme 13 | 14 | orderHint 15 | 0 16 | 17 | 18 | SuppressBuildableAutocreation 19 | 20 | A7C5AB5519FFDADF00E702B6 21 | 22 | primary 23 | 24 | 25 | A7C5AB6E19FFDADF00E702B6 26 | 27 | primary 28 | 29 | 30 | A7C5AB8219FFDAFE00E702B6 31 | 32 | primary 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /MyWidget/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // MyWidget 4 | // 5 | // Created by HMT on 14/10/28. 6 | // Copyright (c) 2014年 MTH. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /MyWidget/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // MyWidget 4 | // 5 | // Created by HMT on 14/10/28. 6 | // Copyright (c) 2014年 MTH. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | - (void)applicationWillResignActive:(UIApplication *)application { 24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application { 29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application { 34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /MyWidget/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /MyWidget/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /MyWidget/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /MyWidget/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.HMT.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /MyWidget/MyWidget.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.application-groups 6 | 7 | group.com.tranfer 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /MyWidget/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // MyWidget 4 | // 5 | // Created by HMT on 14/10/28. 6 | // Copyright (c) 2014年 MTH. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /MyWidget/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // MyWidget 4 | // 5 | // Created by HMT on 14/10/28. 6 | // Copyright (c) 2014年 MTH. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | @interface ViewController () 12 | 13 | @end 14 | 15 | @implementation ViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view, typically from a nib. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /MyWidget/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // MyWidget 4 | // 5 | // Created by HMT on 14/10/28. 6 | // Copyright (c) 2014年 MTH. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /MyWidgetTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.HMT.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /MyWidgetTests/MyWidgetTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // MyWidgetTests.m 3 | // MyWidgetTests 4 | // 5 | // Created by HMT on 14/10/28. 6 | // Copyright (c) 2014年 MTH. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface MyWidgetTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation MyWidgetTests 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TodayExtensionClipsWidget 2 | --- 3 | Imitate Clips to implement Widget. 4 | Implement real-time refresh of OS's clipboard and consolidation,storage by NSUserDefaults. 5 | The detailed usage and noticeable points, please refer to my blog[Tommy Blog](http://conanmthu.github.io/2014/11/02/widget/). 6 | ![](http://hmtphoto.qiniudn.com/clipswidget.gif) ![](http://hmtphoto.qiniudn.com/clipswidget2.gif) 7 | --------------------------------------------------------------------------------