PIXNET Logo登入

pcwiki的部落格

跳到主文

歡迎光臨pcwiki在痞客邦的小天地

部落格全站分類:數位生活

  • 相簿
  • 部落格
  • 留言
  • 名片
  • 7月 17 週五 201518:06
  • How to detect first time app launch on an iPhone 判斷第一次啟動app ios

-(BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
{if(![[NSUserDefaults standardUserDefaults] boolForKey:@"HasLaunchedOnce"]){[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"HasLaunchedOnce"];[[NSUserDefaults standardUserDefaults] synchronize];}return YES;}
(繼續閱讀...)
文章標籤

pcwiki 發表在 痞客邦 留言(0) 人氣(9)

  • 個人分類:IOS
▲top
  • 7月 02 週四 201514:05
  • Can I stop UIImageView Animation at last frame? ios 停在最後一幀 動畫

I just tried this on iOS5 it works. I put animation.image = [myAnimatedView.animationImages lastObject]; right before [myAnimatedView startAnimating]; and the animation stops at the last image. 
(繼續閱讀...)
文章標籤

pcwiki 發表在 痞客邦 留言(0) 人氣(24)

  • 個人分類:IOS
▲top
  • 7月 02 週四 201514:02
  • Cannot send email in app using MFMailComposeViewController 信件 無法開啓 寄信 ios

http://stackoverflow.com/questions/11863527/cannot-send-email-in-app-using-mfmailcomposeviewcontroller
First add and Import the MessageUI Framework
#import <MessageUI/MessageUI.h>
and Declare the MFMaileComposeViewControllerDelegate
(繼續閱讀...)
文章標籤

pcwiki 發表在 痞客邦 留言(0) 人氣(17)

  • 個人分類:IOS
▲top
  • 7月 02 週四 201514:01
  • UIImageView animation delay when doing startAnimating ios lag 延遲

I wouldn't normally recommend using imageNamed and relying on the in-built caching mechanisms. You'll find a lot of discussion on this if you search, but also it won't necessarily pre-render your images anyway.
I use the following code to pre-load and pre-render images so there is no delay when animating the first time through.
NSMutableArray*menuanimationImages =[[NSMutableArray alloc] init];for(int aniCount =1; aniCount <21; aniCount++){NSString*fileLocation =[[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"bg%i", aniCount +1] ofType:@"png"];// here is the code to pre-render the imageUIImage*frameImage =[UIImage imageWithContentsOfFile: fileLocation];UIGraphicsBeginImageContext(frameImage.size);CGRect rect =CGRectMake(0,0, frameImage.size.width, frameImage.size.height);[frameImage drawInRect:rect];UIImage*renderedImage =UIGraphicsGetImageFromCurrentImageContext();UIGraphicsEndImageContext();[menuanimationImages addObject:renderedImage];}

settingsBackground
.animationImages = menuanimationImages;
(繼續閱讀...)
文章標籤

pcwiki 發表在 痞客邦 留言(0) 人氣(39)

  • 個人分類:IOS
▲top
  • 7月 02 週四 201514:00
  • Clearing purchases from IOS in-app purchase sandbox for a test user 測試 沙盒 清除記錄

http://stackoverflow.com/questions/7747457/clearing-purchases-from-ios-in-app-purchase-sandbox-for-a-test-user
Does anyone have any ideas on how to reset and/or clear the IOS in-app purchase sandbox? I have an app that I'm testing with the sandbox, and I'd like to test new purchases without having to create a new test user every time I purchase something. If I don't do this, then I (of course) always get a message that the in-app purchase item has already been purchased when I click on my app's buy button.
 
IMO there are 3 things you can do to make testing non-consumables bearable:
(繼續閱讀...)
文章標籤

pcwiki 發表在 痞客邦 留言(0) 人氣(47)

  • 個人分類:IOS
▲top
  • 6月 15 週一 201511:36
  • MP3 playing using AVAudioPlayer not working on device 音樂播放

I am testing my app on my 3GS iPhone with iOS 4.2
I am using the following code which plays a sound in my IBAction. It works perfectly in the simulator (both iPad and iPhone) - I hear the sound.
NSString*pathToMusicFile1 =[[NSBundle mainBundle] pathForResource:@"alarm" ofType:@"mp3"];NSError*error;
alarmSound
=[[AVAudioPlayer alloc]initWithContentsOfURL:[NSURL fileURLWithPath:pathToMusicFile1] error:&error];NSLog(@"Song1 Loaded");if(alarmSound ==nil){NSLog(@"Error playing sound");}else{
alarmSound
.numberOfLoops =20;
alarmSound
.volume =1.0;[alarmSound play];}
(繼續閱讀...)
文章標籤

pcwiki 發表在 痞客邦 留言(0) 人氣(3)

  • 個人分類:IOS
▲top
  • 6月 15 週一 201511:11
  • SKAction playSoundFileNamed no audio through iphone speaker playSoundFileNamed 沒有聲音 失敗 錯誤

Has anyone had issues playing audio via the SKAction playSoundFileNamed using iOS Sprite Kit through the external speaker of your iOS device? I have the following code that plays the M4A file with no issue through the headphones; however, no audio is played when I unplug the headphones stepping through code it executes just no sound. I have another app that does not use this method and it plays with no issue.
-(void)touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event{/* Called when a touch begins */for(UITouch*touch in touches){CGPoint location =[touch locationInNode:self];SKAction*sound =[SKAction playSoundFileNamed:@"blast.m4a" waitForCompletion:NO];[self runAction:sound];}
(繼續閱讀...)
文章標籤

pcwiki 發表在 痞客邦 留言(0) 人氣(26)

  • 個人分類:IOS
▲top
  • 6月 15 週一 201511:04
  • Pausing certain actions in Sprite Kit 暫停sprite kit skaction

self.view.paused =true;
(繼續閱讀...)
文章標籤

pcwiki 發表在 痞客邦 留言(0) 人氣(10)

  • 個人分類:IOS
▲top
  • 6月 15 週一 201511:02
  • iOS多线程编程之Grand Central Dispatch(GCD)介绍和使用 多執行緒

介绍:
Grand Central Dispatch 简称(GCD)是苹果公司开发的技术,以优化的应用程序支持多核心处理器和其他的对称多处理系统的系统。这建立在任务并行执行的线程池模式的基础上的。它首次发布在Mac OS X 10.6 ,iOS 4及以上也可用。
设计:
(繼續閱讀...)
文章標籤

pcwiki 發表在 痞客邦 留言(0) 人氣(4)

  • 個人分類:IOS
▲top
  • 6月 15 週一 201511:01
  • Install Android NDK on MAC

這篇主要講怎麼安裝以及使用Android NDK,
Android NDK簡單地說,就是讓您能夠在你的app當中使用C/C++進行implementation,
它可以把您寫的C/C++ build出一個share object檔案 (*.so) 讓Java call!類似windows中的dll檔!
當然你也可以在JNI call Java method,也就是說是雙向的!
而使用NDK的好處是大概有下面兩個(我只能想到這兩個..)
(繼續閱讀...)
文章標籤

pcwiki 發表在 痞客邦 留言(0) 人氣(41)

  • 個人分類:IOS
▲top
«1234...21»

個人資訊

pcwiki
暱稱:
pcwiki
分類:
數位生活
好友:
累積中
地區:

熱門文章

  • (1,893)Android 新手上路 安裝系統(linux, Android, eclipse, ADT)
  • (4,214)IBM DB2 Oracle MS SQL 的比較
  • (1,023)0707(3)_java輸出入與迴圈
  • (266)[轉][mysql]can't connect to MySQL Server
  • (11,457)[轉]解決javac編譯時中文編碼警告的問題
  • (221)[轉] WampServer php mysql 集成包 多國語
  • (18,128)[轉] WampServer 用自已電腦架站
  • (660)[轉] Android - 取得WIFI相關資訊
  • (8,715)[轉] Java - String.getBytes()的中文編碼問題 亂碼 中文
  • (1,043)[轉] 解决Excel数据导入sqlite中的中文乱码问题 亂碼 execl sql

文章分類

toggle IOS (1)
  • IOS (42)
  • 伺服器+資料庫 (7)
  • SCJP 6.0 (5)
  • Android軟體 (9)
  • Android影片教學 (5)
  • Android新聞 (8)
  • Android教學 (104)
  • linux (1)
  • 未分類文章 (1)

最新文章

  • [旅遊] 日本-大阪
  • [旅遊] 台中
  • [旅遊] 高雄
  • [旅遊] 苗栗
  • 工程師心得
  • ios core data database sample 範本 加入core data
  • 類似 Observer Pattern 的 NSNotificationCenter ios 訊息處理 觀察者模式
  • ios in-app purchase flow 流程 程式內購買 開發 詳細 教程
  • ios iRate 第三方 投票 評等 評分 評價 開發 應用程式 app
  • ios 更改 顯示名稱 本地化 多國語言

文章精選

文章搜尋

誰來我家

參觀人氣

  • 本日人氣:
  • 累積人氣: