add weixinapi
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#import "LXCountTimer.h"
|
||||
#import "GiGaHelper.h"
|
||||
#import <MediaPlayer/MediaPlayer.h>
|
||||
#import "GiGaMeViewController.h"
|
||||
|
||||
@interface GiGaMaskTaskViewController ()
|
||||
{
|
||||
@@ -56,7 +57,7 @@
|
||||
|
||||
-(void)viewWillAppear:(BOOL)animated{
|
||||
[super viewWillAppear:animated];
|
||||
[self startMaskTime];
|
||||
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
@@ -139,14 +140,15 @@
|
||||
-(void)startMaskTime{
|
||||
|
||||
AppDelegate *delegate =(AppDelegate *) [[UIApplication sharedApplication] delegate];
|
||||
if (delegate.isMasking) {
|
||||
return;
|
||||
}
|
||||
delegate.isMasking = YES;
|
||||
[_musicPalyer play];
|
||||
|
||||
[self setBackGroundPlayingInfo];//锁屏音频信息
|
||||
|
||||
//总时间隔 s
|
||||
NSTimeInterval timeInterVal = 58;
|
||||
|
||||
NSString *timeformat = [GiGaHelper stringWithNSTimerinterval:timeInterVal];
|
||||
NSArray *timesArr = [timeformat componentsSeparatedByString:@":"];
|
||||
NSString *hour = timesArr[0];
|
||||
@@ -161,8 +163,7 @@
|
||||
|
||||
}
|
||||
|
||||
#pragma mark 设置后台锁屏样式 无效??
|
||||
|
||||
#pragma mark 设置后台锁屏音频信息
|
||||
-(void)setBackGroundPlayingInfo{
|
||||
|
||||
MPMediaItemArtwork *arwork = [[MPMediaItemArtwork alloc] initWithImage:[UIImage imageNamed:@"MaskTime.png"]];
|
||||
@@ -181,6 +182,7 @@
|
||||
[[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
|
||||
|
||||
}
|
||||
|
||||
- (void) remoteControlReceivedWithEvent: (UIEvent *) receivedEvent {
|
||||
|
||||
if (receivedEvent.type == UIEventTypeRemoteControl) {
|
||||
@@ -216,15 +218,12 @@
|
||||
#pragma mark 开始测试
|
||||
-(void)testBtnAcion:(UIButton *)btn{
|
||||
|
||||
AppDelegate *delegate =(AppDelegate *) [[UIApplication sharedApplication] delegate];
|
||||
if (delegate.isMasking) {
|
||||
return;
|
||||
}
|
||||
|
||||
[self startMaskTime];
|
||||
|
||||
return ;
|
||||
|
||||
|
||||
BOOL isUserLogin = [GiGaUserDefault isUserLogin];
|
||||
|
||||
if (isUserLogin) {
|
||||
|
||||
//GIGA_ShowToast(@"userLogin!");
|
||||
@@ -260,7 +259,6 @@
|
||||
|
||||
GiGaAdDetailViewController *detailVC=[[GiGaAdDetailViewController alloc] init];
|
||||
[self.navigationController pushViewController:detailVC animated:YES];
|
||||
|
||||
}
|
||||
|
||||
#pragma mark 新手引导消失
|
||||
@@ -298,11 +296,13 @@
|
||||
userGuardVC.view.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.5];
|
||||
[self presentViewController:userGuardVC animated:NO completion:nil];
|
||||
}
|
||||
|
||||
#pragma mark App引导页
|
||||
-(void)showAPPappGaurdView{
|
||||
GiGaAppGaurdVC *gaurdVC = [[GiGaAppGaurdVC alloc] init];
|
||||
[self presentViewController:gaurdVC animated:YES completion:nil];
|
||||
}
|
||||
|
||||
#pragma mark - setUpNav
|
||||
-(void)setUpNav{
|
||||
|
||||
@@ -320,11 +320,11 @@
|
||||
[rightBtn setImage:[UIImage imageNamed:@""] forState:UIControlStateNormal];
|
||||
[rightBtn addTarget:self action:@selector(rightBtnAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:rightBtn];
|
||||
|
||||
}
|
||||
#pragma mark 消息 action
|
||||
|
||||
#pragma mark 消息 action
|
||||
-(void)leftBtnAction{
|
||||
|
||||
BOOL isUserLogin = [GiGaUserDefault isUserLogin];
|
||||
if (isUserLogin) {
|
||||
|
||||
@@ -342,6 +342,9 @@
|
||||
#pragma mark 个人中心 action
|
||||
-(void)rightBtnAction{
|
||||
|
||||
GiGaMeViewController *meVC= [[GiGaMeViewController alloc] init];
|
||||
[self.navigationController pushViewController:meVC animated:YES];
|
||||
|
||||
}
|
||||
|
||||
#pragma mark -bottomView
|
||||
|
||||
Reference in New Issue
Block a user