`-webkit-overflow-scrolling: touch` broken for initially offscreen elements in iOS7

Looks like there is a workaround to this problem on apple dev forums So many thanks to Mr Baicoianu. Basically you need to listen to touch events on the parent scroll div. So in my case add: document.getElementById(“scrollbox”).addEventListener(‘touchstart’, function(event){}); to the onBodyLoad function. I guess this is some event propagation issue, solved by listening at … Read more

AVSpeechSynthesizer in background mode

You must set “Audio and AirPlay” in background modes. You have to configure the audio session: NSError *error = NULL; AVAudioSession *session = [AVAudioSession sharedInstance]; [session setCategory:AVAudioSessionCategoryPlayback error:&error]; if(error) { // Do some error handling } [session setActive:YES error:&error]; if (error) { // Do some error handling }

iOS 7 BUG – NSAttributedString does not appear

I have found a workaround for this bug. In your github code, to use the workaround, you would say this: NSAttributedString* attrStr = [[NSAttributedString alloc] initWithString:@”Lorem ipsum dolor sit\n” // <— attributes: @{NSUnderlineStyleAttributeName:@(NSUnderlineStyleSingle), NSParagraphStyleAttributeName:paragraph}]; UILabel* myLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 30, 0, 0)]; myLabel.backgroundColor = [UIColor greenColor]; myLabel.attributedText = attrStr; [myLabel sizeToFit]; myLabel.numberOfLines = 2; … Read more

Scroll View not functioning IOS 7

There are two ways you can get the scrolling to work. Approach 1 (with code): 1) Pin UIScrollView to the sides of its parent view, as mentioned below. 2) Set content size of your scroll view in viewDidLayoutSubviews: – (void)viewDidLayoutSubviews { self.MainScroll.contentSize = CGSizeMake(320, 1800); } Approach 2 (pure IB, no code required): 1) Setting … Read more

How can I change the text and icon colors for tabBarItems in iOS 7?

There are two things you need to do for this: 1) If you want to customize the TabBar itself, you need to set the barTintColor for the tabBarController: // this will generate a black tab bar tabBarController.tabBar.barTintColor = [UIColor blackColor]; // this will give selected icons and text your apps tint color tabBarController.tabBar.tintColor = appTintColor; … Read more

iPhone landscape-only no launch image for iOS7 R4 image asset

My Solution is Don’t use asset catalogs and provide Default.png (320×480) [email protected] (640×960) [email protected] (640×1136) as bundle in project and iOS will automatically found them(Apple doesn’t have landscape launch image for iPhone or iPod, so we need to provide rotated 90 degree of landscape image) You may need Default-Landscape@2x~ipad.png Default-Landscape~ipad.png if you do iPad too. … Read more