PIXNET Logo登入

pcwiki的部落格

跳到主文

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

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

  • 相簿
  • 部落格
  • 留言
  • 名片
  • 5月 20 週三 201510:59
  • How can I disable the UITableView selection highlighting? 關閉 UITableView 點擊 高亮 使失效

When you tap a row in a UITableView, the row is highlighted and selected. Is it possible to disable this so tapping a row does nothing?
 
 
(繼續閱讀...)
文章標籤

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

  • 個人分類:IOS
▲top
  • 5月 20 週三 201510:51
  • [轉]iOS並發編程NSThread、Grand Central Dispatch、Operation Queue 多執行續

並發的意思就是同時運行多個任務,這些任務可以在單核CPU上以分時(時間共享)的形式同時運行,或者在多核CPU上以真正的並行來運行多任務。



在移動和桌面操作系統中,蘋果提供了相同的並發編程API。 NSThread、Grand Central Dispatch(GCD)、NSOperationQueue
(繼續閱讀...)
文章標籤

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

  • 個人分類:IOS
▲top
  • 5月 20 週三 201510:49
  • Is there a way to pause SKActions? 暫停 SKScreen 遊戲 IOS Spritekit

Documentation says that parent SKView object has a paused property. Set it to YES to pause the scene.

Paused
A Boolean value that indicates whether the view’s scene animations are paused.
@property(getter=isPaused, nonatomic) BOOL paused
Discussion If the value is YES, then the scene’s content is fixed on screen. No actions are executed and no physics simulation is performed."
(繼續閱讀...)
文章標籤

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

  • 個人分類:IOS
▲top
  • 5月 20 週三 201509:50
  • Proper way to exit iPhone application? 離開 iphone app 關閉app






Have you tried exit(0)?


Alternatively, [[NSThread mainThread] exit], although I have not tried that it seems like the more appropriate solution.


 


On the iPhone there is no concept of quitting an app. The only action that should cause an app to quit is touching the Home button on the phone, and that's not something developers have access to.


According to Apple, your app should not terminate on its own. Since the user did not hit the Home button, any return to the Home screen gives the user the impression that your app crashed. This is confusing, non-standard behavior and should be avoided.


 


After some tests, I can say the following:



  • using the private interface : [UIApplication sharedApplication] will cause the app looking like it crashed, BUT it will call - (void)applicationWillTerminate:(UIApplication *)application before doing so;

  • using exit(0); will also terminate the application, but it will look "normal" (the springboard's icons appears like expected, with the zoom out effect), BUT it won't call the - (void)applicationWillTerminate:(UIApplication *)application delegate method.


My advice:



  1. Manually call the - (void)applicationWillTerminate:(UIApplication *)application on the delegate.

  2. Call exit(0);.










shareimprove this answer



answered May 17 '09 at 17:00




rchampourlier
1,7491623






 

















    


Apple says not to use exit due to "Applications calling exit will appear to the user to have crashed, rather than performing a graceful termination and animating back to the Home screen"developer.apple.com/library/ios/#qa/qa2008/qa1561.html –  Micky Duncan Sep 5 '12 at 22:20






(繼續閱讀...)
文章標籤

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

  • 個人分類:IOS
▲top
  • 5月 20 週三 201509:48
  • how to add particles using SpriteKit in iOS7 加入 粒子 IOS SpriteKit

Lets say that you have a particle already created called MyParticle.sks.
First, you have to create a SKEmitterNode with your particle:
NSString *myParticlePath = [[NSBundle mainBundle] pathForResource:@"MyParticle" ofType:@"sks"];
SKEmitterNode *myParticle = [NSKeyedUnarchiver unarchiveObjectWithFile:myParticlePath];
(繼續閱讀...)
文章標籤

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

  • 個人分類:IOS
▲top
  • 4月 17 週五 201516:35
  • Horizontally mirror a SKSpriteNode texture 鏡像 圖片 左右相反

You can use this code to flip among x-axis:
spriteNode.xScale = spriteNode.xScale *-1;
(繼續閱讀...)
文章標籤

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

  • 個人分類:IOS
▲top
  • 4月 17 週五 201516:30
  • Two or more collisions at same time in Sprite Kit 同時多個碰撞

Maybe queuing the contacts and handle then in -update is what you need. For example:
Declare an instance variable called NSMutableArray *_contactQueue; Add the contacts to the array:
-(void) didBeginContact:(SKPhysicsContact*)contact
{[_contactQueue addObject:contact];}
(繼續閱讀...)
文章標籤

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

  • 個人分類:IOS
▲top
  • 4月 17 週五 201516:28
  • 在iOS上present一个半透明的viewController 透明view controller

今天尝试着在一个ViewController上面调用:
 


[cpp] view plaincopy在CODE上查看代码片派生到我的代码片
 




  • - (void)presentModalViewController:(UIViewController *)modalViewController animated:(BOOL)animated  

  • (繼續閱讀...)
    文章標籤

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

    • 個人分類:IOS
    ▲top
    • 4月 17 週五 201516:25
    • IOS Navigate Back to previous view controller 返回上一頁 返回 view controller

    You are using :
    [self.navigationController popToRootViewControllerAnimated:TRUE];
    (繼續閱讀...)
    文章標籤

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

    • 個人分類:IOS
    ▲top
    • 4月 17 週五 201516:24
    • ios 模擬器 大小 調整

    如何调整这个模拟器的大小。 command + R  模拟器运行后, 再按 command +1、 command+2、 command+3, 试试看。 你会发现 模拟器的大小发生了变化。
    (繼續閱讀...)
    文章標籤

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

    • 個人分類:IOS
    ▲top
    «1...45621»

    個人資訊

    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,458)[轉]解決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 更改 顯示名稱 本地化 多國語言

    文章精選

    文章搜尋

    誰來我家

    參觀人氣

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