- 浏览: 356183 次
- 性别:
- 来自: 福州
-
文章分类
- 全部博客 (145)
- iPhone不能分类的 (37)
- UITableView (7)
- CALayer (4)
- UIButton (2)
- NSFileManager (4)
- UIAlertView (1)
- ASIHTTPRequest (2)
- NSDate (8)
- UIImageView (1)
- UIFont (1)
- Mac OS X (4)
- NSString (5)
- UINavigationBar (2)
- UIView (7)
- UIScrollView (1)
- UIDatePicker (1)
- NSLog (2)
- UIWebView (2)
- MKMapView (6)
- core plot (1)
- UILabel (2)
- UIImage (3)
- NSArray NSMutableArray (2)
- iphone基础知识 (3)
- NSDictionary NSMutableDictionary (1)
- Block (2)
- UINavigationController (1)
- Quartz (3)
- UIColor (1)
- NSNotificationCenter (1)
- NSNumber (1)
- NSError (1)
- NSTimer (1)
- NSURL (1)
- KVO (1)
- UIBarButtonItem (1)
- NSUserDefaults (1)
- 软键盘 (1)
- UITextView (2)
- CLLocationManager (1)
- xCode (2)
- VC (3)
- Private Framework (1)
- xCode调试技巧 (2)
- IOS7 (3)
- cocos2d-x (5)
- 后台运行 (1)
- Chromium (0)
最新评论
-
feishihai:
太 感谢 了!!!其他地方说的都只有一半!!
xcode5 Icon already includes gloss effects doesnot work解决方法 -
hhb19900618:
你这个效果有渐变吗?
UITableView阴影 -
zhaoyubetter:
不对啊。这是遍历 value啊
NSDictionary遍历所有的key和Values -
sunqingquan:
学习啦,加油
NSError code错误列表信息 -
liubiqu:
如果有xib文件需要增加一个language,这样调用选择图片 ...
iphone系统控件里显示中文标题设置
app需满足下面条件才能在后台运行,否则最多只能在后台10~15分钟
your app must be one of these types:
- Apps that play audible content to the user while in the background, such as a music player app
- Apps that keep users informed of their location at all times, such as a navigation app
- Apps that support Voice over Internet Protocol (VoIP)
- Newsstand apps that need to download and process new content
- Apps that receive regular updates from external accessories
And you must add to the Info.plist as follows: Add the UIBackgroundModes key to your Info.plist file and set its value to an array containing one or more of the following strings:
- audio—The app plays audible content to the user while in the background. (This content includes streaming audio or video content using AirPlay.)
- location—The app keeps users informed of their location, even while it is running in the background.
- voip—The app provides the ability for the user to make phone calls using an Internet connection.
- newsstand-content—The app is aNewsstand app that downloads and processesmagazine or newspaper content in the background.
- external-accessory—The app works with a hardware accessory that needs to deliver updates on a regular schedule through the External Accessory framework.
- bluetooth-central—The app works with a Bluetooth accessory that needs to deliver updates on a regular schedule through the CoreBluetooth framework
Note that part of the review process will be checking to make sure that your app does what it says it's doing with regard to background processing.
--不能满足上面3个条件的app后台运行例子----------------------------
UIApplication* app = [UIApplication sharedApplication]; __block UIBackgroundTaskIdentifier task = [app beginBackgroundTaskWithExpirationHandler:^{ [app endBackgroundTask:task]; task = UIBackgroundTaskInvalid; }]; // Start the long-running task and return immediately. dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ // Do the work associated with the task. NSLog(@"Started background task timeremaining = %f", [app backgroundTimeRemaining]); if (connectedToNetwork) { // do work son... } [app endBackgroundTask:task]; task = UIBackgroundTaskInvalid; });
发表评论
-
XCode工程内多Targets教程
2014-08-11 09:20 1549原帖地址 http://www.coc ... -
iOS7 Custom UITabBarController
2014-07-02 16:57 751http://blog.csdn.net/u014084081 ... -
[CALayer release]: message sent to deallocated instance iOS内存过度释放问题
2014-06-24 16:30 1367http://www.cnblogs.com/cocoaji ... -
Determine device (iPhone, iPod Touch) with iPhone SDK
2014-05-01 19:57 1086- (NSString *) platformStri ... -
appstore 网址 相关
2014-04-06 15:57 1056获取某个app的网址,格式:https://itunes. ... -
在Xcode项目中导入自定义的字体-
2014-03-14 21:33 15951. 将你的font的ttf文件导入到项目里。 2. 找到 ... -
检测文件属性(图片,视频或文本)
2013-12-10 17:17 980NSString *file = @"ht ... -
xcode 的project.pbxproj 的合并问题
2013-11-19 17:10 1104打开project.pbxproj 手工删除了里面>&g ... -
NSAttributedString.h
2013-10-30 14:25 2351*/ UIKIT_EXTERN NSString *co ... -
IOS 如何获取当前设置的语言
2013-05-27 14:20 5488NSUserDefaults *defaults = [NSU ... -
统计代码函数
2013-01-06 09:31 954find . "(" -name &qu ... -
@dynamic 和@synthesize区别,@encode
2012-12-06 09:56 1851@dynamic 是相对于 @synthesize的,它 ... -
NSNumberFormatter使用方法
2012-10-09 17:24 1339NSNumberFormatter* moneyFor ... -
animateWithDuration block main thread
2012-07-02 15:32 1636用+ (void)animateWithDuration:(N ... -
iOS系统中各种设置项的URL链接
2012-01-16 13:09 1348在代码中调用如下代码:NSURL*url=[NSURL ... -
xcode4.2中为propery重写setter和getter方法会出现警告解决方法
2012-01-07 21:24 2655xcode4.2中为propery重写setter和gette ... -
使用animateWithDuration 导致exc_bad_access
2011-12-30 12:32 1487这时看看系统设置中的other link flags是否有使用 ... -
xcode4.2编译支持IOS3.1.2系统设置
2011-12-26 12:16 12171.Change the Target's "Bui ... -
iPhone、iPad通用的应用程序图标设置
2011-12-18 21:38 1227http://blog.csdn.net/diyagoanyh ... -
What is the basic difference between NSTimer, NSTask, NSThread and NSRunloop?
2011-12-13 10:19 1147http://stackoverflow.com/questi ...
相关推荐
node.js-based process in the background that listens to a socket connection. By pointing your computer's web browser to that socket on the device -- say using "adb forward" -- you can see all the ...
a WinForm application) may need to respond to a hotkey or shortcut (used interchangeably in this article) regardless of if the app is focused or running in the background.
Length Tasks`)、下载内容(`Downloading Content in the Background`)、实施长时间运行任务(`Implementing Long-Running Tasks`)、声明应用支持的后台任务(`Declaring Your App’s Supported Background Tasks...
The Stereo Rendering sample for Java will show you how to detect whether your app is running on a digital eyewear device, and how to then configure its video background rendering for stereo....
Implement functionality for running tasks in the background Table of Contents Chapter 1. Making the Transition from .NET (Part 1) Chapter 2. Making the Transition from .NET (Part 2) Chapter 3. Local ...
Author Nick Harris has extensive experience developing for iOS and provides a solid background for teaching the building blocks of app development. Learn Objective-C and how it differs from other ...
That’s where this book comes in Spanning 466 pages, The Busy Coder’s Guide to Android Development covers a wide range of Android capabilities and APIs, from creating simple user interfaces, to ...
These tests were done on a HP ML120G6 system with 12Gb Ram, 10k raid disk drives running Windows 2008 Server R2 64 bit. For a measure of relative performance to RaptorDb v1 I have included a 20 ...
Building and Deploying iOS Applications starts at the beginning including an introduction to Objective C and gives you the skills you need to get your apps up and running Author Nick Harris has ...
compress, and encrypt data via streams Design apps that give the illusion of running using live tiles, background transfers, and background tasks Share data between apps using the clipboard and the ...
For multitasking, they can use background modes and task completion to manage app behavior when running in the background. - **Sample Code**: The book includes code examples for implementing ...
You will learn how to import Java and Objective C libraries in your app and how to use the SDK classes from your Object Pascal code. Chapter 10, Delphi and IoT, talks about how the two most popular ...
That’s where this book comes in Spanning 466 pages, The Busy Coder’s Guide to Android Development covers a wide range of Android capabilities and APIs, from creating simple user interfaces, to ...
- TRIM_MEMORY_BACKGROUND:应用正在后台运行,但系统正在释放内存。 - TRIM_MEMORY_UI_HIDDEN:应用从前台切换到后台,用户界面被隐藏。 在本文提供的实例中,开发者可以通过覆盖onTrimMemory(int level)方法来...
<END><br>64,TransIco.zip An update to my previous code : Added a couple of features some ppl asked me for...like the ability to change the text colour of the icon and also keep the background ...
DHCP will (in the background) continue to try to acquire a valid lease while Windows for Workgroups continues to run (although you will not have TCP/IP functionality). If you are running with DHCP ...
.setContentText("Your app is performing background tasks.") .setSmallIcon(R.drawable.ic_notification) .build(); startForeground(1, notification); } ``` 其次,对于那些不必要立即执行或可以稍后执行...