資源簡介
藍牙與外設自動連接 交互 智能報警提示 智能定位等功能

代碼片段和文件信息
//
//??AlarmViewController.m
//??BluetoothTest
//
//??Created?by?Pro?on?14-4-8.
//??Copyright?(c)?2014年?Pro.?All?rights?reserved.
//
#import?“AlarmViewController.h“
#import?“config.h“
#import?
//#import?
@interface?AlarmViewController?()
@end
@implementation?AlarmViewController
-?(id)initWithNibName:(NSString?*)nibNameOrNil?bundle:(NSBundle?*)nibBundleOrNil
{
????self?=?[super?initWithNibName:nibNameOrNil?bundle:nibBundleOrNil];
????if?(self)?{
????????//?Custom?initialization
????}
????return?self;
}
-?(void)viewDidLoad
{
????[super?viewDidLoad];
????//?Do?any?additional?setup?after?loading?the?view.
????_table?=?[[UITableView?alloc]initWithframe:CGRectMake(0?0?kDeviceWidth?kDeviceHeight)?style:UITableViewstyleGrouped];
????_table.dataSource?=self;
????_table.delegate?=?self;
????[self.view?addSubview:_table];
????
????UIButton?*bu?=?[UIButton?buttonWithType:UIButtonTypeRoundedRect];
????[bu?settitle:@“返回“?forState:UIControlStateNormal];
????bu.layer.cornerRadius?=?5;
????bu.layer.masksToBounds?=?YES;
????[bu?setBackgroundImage:[UIImage?imageNamed:@“back2.png“]?forState:UIControlStateNormal];
????[bu?addTarget:self?action:@selector(backClick:)?forControlEvents:UIControlEventTouchUpInside];
????bu.frame?=?CGRectMake(0?0?60?30);
????UIBarButtonItem?*backBarButton?=?[[UIBarButtonItem?alloc]initWithCustomView:bu];
????self.navigationItem.leftBarButtonItem?=?backBarButton;
????
????_arr?=?[NSMutableArray?arrayWithobjects:@“電子警報音效“@“防盜器音效“@“雷達咚咚音效“@“信號燈音效“?nil];
}
-(void)backClick:(id)sender
{
????[self.navigationController?popToRootViewControllerAnimated:YES];
}
-(NSInteger)numberOfSectionsInTableView:(UITableView?*)tableView
{
????return?1;
}
-(NSInteger)tableView:(UITableView?*)tableView?numberOfRowsInSection:(NSInteger)section
{
????return?[_arr?count];
}
-(UITableViewCell?*)tableView:(UITableView?*)tableView?cellForRowAtIndexPath:(NSIndexPath?*)indexPath
{
????static?NSString?*identified?=?@“cell“;
????UITableViewCell?*cell?=?[tableView?dequeueReusableCellWithIdentifier:identified];
????if?(cell?==?nil)?{
????????cell?=?[[UITableViewCell?alloc]initWithstyle:UITableViewCellstyleDefault?reuseIdentifier:identified];
????????UIButton?*play?=?[UIButton?buttonWithType:UIButtonTypeRoundedRect];
????????play.frame?=?CGRectMake(230?10?60?30);
????????[play?addTarget:self?action:@selector(playAction:event:)?forControlEvents:UIControlEventTouchUpInside];
????????[play?settitle:@“播放“?forState:UIControlStateNormal];
????????[cell.contentView?addSubview:play];
????????cell.backgroundColor??=?[UIColor?clearColor];
????}
????
????cell.textLabel.text?=?[_arr?objectAtIndex:indexPath.row];
????return?cell;
}
-(void)tableView:(UITableView?*)tableView?didSelectRowAtIndexPath:(NSIndexPath?*)indexPath
{
????NSString?*name?=?[tableView?cellForRowAtIndexPath:indexPath].textLabel.text;
????NSLog(@“%@“name);
????[_delegate?selectAlarm:name?to:_index];
????[self.navigationController?popView
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2014-05-07?21:28??BluetoothTest嫻嬭瘯\
?????文件???????15364??2014-05-03?10:01??BluetoothTest嫻嬭瘯\.DS_Store
?????目錄???????????0??2014-05-28?14:31??__MACOSX\
?????目錄???????????0??2014-05-28?14:31??__MACOSX\BluetoothTest嫻嬭瘯\
?????文件??????????82??2014-05-03?10:01??__MACOSX\BluetoothTest嫻嬭瘯\._.DS_Store
?????目錄???????????0??2014-05-13?14:44??BluetoothTest嫻嬭瘯\.git\
?????目錄???????????0??2014-04-06?10:08??BluetoothTest嫻嬭瘯\.git\branches\
?????文件??????????15??2014-04-06?10:08??BluetoothTest嫻嬭瘯\.git\COMMIT_EDITMSG
?????文件?????????137??2014-04-06?10:08??BluetoothTest嫻嬭瘯\.git\config
?????文件??????????73??2014-04-06?10:08??BluetoothTest嫻嬭瘯\.git\desc
?????文件??????????23??2014-04-06?10:08??BluetoothTest嫻嬭瘯\.git\HEAD
?????目錄???????????0??2014-04-06?10:08??BluetoothTest嫻嬭瘯\.git\hooks\
?????文件?????????452??2014-04-06?10:08??BluetoothTest嫻嬭瘯\.git\hooks\applypatch-msg.sample
?????文件?????????896??2014-04-06?10:08??BluetoothTest嫻嬭瘯\.git\hooks\commit-msg.sample
?????文件?????????189??2014-04-06?10:08??BluetoothTest嫻嬭瘯\.git\hooks\post-update.sample
?????文件?????????398??2014-04-06?10:08??BluetoothTest嫻嬭瘯\.git\hooks\pre-applypatch.sample
?????文件????????1642??2014-04-06?10:08??BluetoothTest嫻嬭瘯\.git\hooks\pre-commit.sample
?????文件????????1352??2014-04-06?10:08??BluetoothTest嫻嬭瘯\.git\hooks\pre-push.sample
?????文件????????4951??2014-04-06?10:08??BluetoothTest嫻嬭瘯\.git\hooks\pre-reba
?????文件????????1239??2014-04-06?10:08??BluetoothTest嫻嬭瘯\.git\hooks\prepare-commit-msg.sample
?????文件????????3611??2014-04-06?10:08??BluetoothTest嫻嬭瘯\.git\hooks\update.sample
?????文件????????8056??2014-05-13?14:44??BluetoothTest嫻嬭瘯\.git\index
?????目錄???????????0??2014-04-06?10:08??BluetoothTest嫻嬭瘯\.git\info\
?????文件??????????40??2014-04-06?10:08??BluetoothTest嫻嬭瘯\.git\info\exclude
?????目錄???????????0??2014-05-28?14:31??__MACOSX\BluetoothTest嫻嬭瘯\.git\
?????目錄???????????0??2014-05-28?14:31??__MACOSX\BluetoothTest嫻嬭瘯\.git\info\
?????文件?????????171??2014-04-06?10:08??__MACOSX\BluetoothTest嫻嬭瘯\.git\info\._exclude
?????目錄???????????0??2014-04-06?10:08??BluetoothTest嫻嬭瘯\.git\logs\
?????文件?????????167??2014-04-06?10:08??BluetoothTest嫻嬭瘯\.git\logs\HEAD
?????目錄???????????0??2014-04-06?10:08??BluetoothTest嫻嬭瘯\.git\logs\refs\
?????目錄???????????0??2014-04-06?10:08??BluetoothTest嫻嬭瘯\.git\logs\refs\heads\
............此處省略303個文件信息
- 上一篇:epics概述,epics基本原理技術講解
- 下一篇:高通QFIL刷機工具
評論
共有 條評論