ios6

How to launch an APP in background in iOS 6.x silently

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 14:38:01
We want to launch an APP silently in iPhone without bring this APP to the Foreground. In iOS 5.x we achieve this goal by this code: [(SBApplication*)app setDisplaySetting:0x4 flag:NO]; [(SBDisplayStack*)displayStack pushDisplay:app]; [(SBDisplayStack*)displayStack popDisplay:app]; But, in iOS 6.x there is not SBDisplayStack any more. I did some search but not found any answers. Someone says that SBWorkSpace replaces the SBDisplayStack in iOS 6.x. We use SBAppToAppWorkspaceTransaction to implement but always bring the APP to the Foreground which dose not achieve our goal. Anyone can help me?

Xcode 4.5.1 get stuck when archiving

有些话、适合烂在心里 提交于 2019-12-04 13:43:22
I just upgraded my xcode to version 4.5.1. Everything worked fine before but now, when I Archive the project, xcode get stuck/hanging and never finishes the archiving. In the status on top, the text says: Compiling 10 of 10 source files... Nothing happens after that. It is just stuck. I can still compile and build the code (without archiving) and everything runs just fine in the simulator. I have reinstalled xcode. The issue still happens after that. Any suggestion will be appriciated. More info: I've pinpointed the problem to a specific line of code: CGRect tmpFrame3 = seeDetailsButton.frame;

Hiding Address Bar in Mobile Safari With Reader Button Visible

强颜欢笑 提交于 2019-12-04 12:49:11
Ok, so I'm using the suggested window-scrollTo method and it's working just swimmingly everywhere except for one little sticking point. When Safari decides to show the "Reader" button figuring I might want to save my page for later reading, it keeps the address bar up for a full 5 seconds before finally hiding it like I asked. Kind of an eternity in UX time. Is this an iOS 6 thing or did it also do this in iOS 5? (I don't have a 5 device to test it on at the moment.) Also, is there any way to get around it? I've looked around quite a bit and there doesn't appear to be any way to disable the

Modern technique of adding gradient to UIView

瘦欲@ 提交于 2019-12-04 12:44:45
I know of several ways of adding background gradients to UIView. I was wondering what is the most efficient and scalable way of doing so, and why? Here are the techniques I've used: Create subview of UIView and overwrite the drawRect, where I draw the gradient in current context. a. When using the above gradient create it with the bounds of view I want to decorate and insert this background gradient as first subview, i.e. – insertSubview:atIndex: b. After I get the background gradient view from above, I render it in image context and use it as background image, i.e. UIGraphicsBeginImageContext

different vertical alignment Font between ios6 and ios7

若如初见. 提交于 2019-12-04 12:33:24
I have some problem with the vertical alignment Font between iOS6 and iOS7, I have a custom font that in iOS6 was a bit higher then a centre of vertical alignment in a UIButton , so have I done it? I've set the myButton.titleEdgeInsets = UIEdgeInsetsMake(6, 0, 0, 0) and I've fixed the issue, but now with the iOS7 have the opposite issue now with iOS7 the font is a bit lower...How i can fix this problem for have the same result in both iOS? Thanks in advance 来源: https://stackoverflow.com/questions/19756284/different-vertical-alignment-font-between-ios6-and-ios7

Playing youtube using <iframe> fails on iPhone, but still works for iPad under iOS 6 (both work fine on iOS 5)

♀尐吖头ヾ 提交于 2019-12-04 12:02:42
I use the following HTML template with an to hand to a UIWebView. I understand that this is the supported way to play youtube videos. <html> <body> <!-- 1. The <iframe> (and video player) will replace this <div> tag. --> <div id="player"></div> <script> // 2. This code loads the IFrame Player API code asynchronously. var tag = document.createElement('script'); tag.src = "http://www.youtube.com/player_api"; var firstScriptTag = document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); // 3. This function creates an <iframe> (and YouTube player) //

How to calculate total size of NSDictionary object?

…衆ロ難τιáo~ 提交于 2019-12-04 11:44:32
问题 How to calculate total size of NSDictionary object? i have 3000 StudentClass objects in NSDictionary with different keys. And i want to calculate total size of dictionary in KB. I used malloc_size() but it always return 24 ( NSDictionary contain either 1 object or 3000 object) sizeof() also returns always same. 回答1: You could try to get all the keys of the Dictionary in an array and then iterate the array to find the size, it might give you the total size of the keys inside the dictionary.

Child content view controller view has wrong bounds size from Storyboard?

て烟熏妆下的殇ゞ 提交于 2019-12-04 11:03:43
This document outline from my sample Storyboard shows what I'm working with. I have a custom container view controller and two content view controllers connected via embed segues. Here is the storyboard itself. ZetaViewController has to create some programmatic views (within ZetaView, of course). I noticed when I was centering these programmatically created views they seemed really off center. ZetViewController is centering things by examining self.view.bounds.size.height and self.view.bounds.size.width and doing some appropriate arithmetic. When I added debug logging to ZetaViewController, I

IOS6 landscape playing embedded youtube video from a uiwebview within an only portrait iPhone app

≯℡__Kan透↙ 提交于 2019-12-04 10:55:38
问题 I've got an iPhone application with a storyboard,few xib and custom cells. The application is set as a "portrait" as "supported interface orientation" (i mean everything is display like that). In my custom cells, there is Uiwebview that is linked to a youtube embedded video, when i clicked it the video start to playing, but my problem is that they are always playing in "portrait" mode. I've read lots of things that solve this problem but only in ios5. Actually : I can identify when the video

iOS7 Status Bar over Navigation Bar

不打扰是莪最后的温柔 提交于 2019-12-04 10:31:15
问题 I'm testing my application with iOS7 and I have an issue with status bar. Basically the status bar appear over navigation bar like the image below: I try to call in my viewDidLoad self.edgesForExtendedLayout = UIRectEdgeNone; self.automaticallyAdjustsScrollViewInsets = YES; without success. I have also added to the info.plist file UIViewControllerBasedStatusBarAppearance with no luck. The main problem is that the application must be compatible with iOS6 and iOS7 and currently on iOS7 the view