CSS Background image not loading

First of all, wave bye-bye to those quotes: background-image: url(nickcage.jpg); // No quotes around the file name Next, if your html, css and image are all in the same directory then removing the quotes should fix it. If, however, your css or image are in subdirectories of where your html lives, you’ll want to make … Read more

NSUserDefaults losing its keys & values when phone is rebooted but not unlocked

I was having a very similar issue. Background the application. Use other memory heavy applications till my application gets jettisoned from memory. (You can observe this event if you have your device plugged and xcode running the build. Xcode will tell you “application was terminated due to memory pressure). From here if your application is … Read more

Detecting user settings for Background App Refresh in iOS 7

this is what you are looking for. if ([[UIApplication sharedApplication] backgroundRefreshStatus] == UIBackgroundRefreshStatusAvailable) { NSLog(@”Background updates are available for the app.”); }else if([[UIApplication sharedApplication] backgroundRefreshStatus] == UIBackgroundRefreshStatusDenied) { NSLog(@”The user explicitly disabled background behavior for this app or for the whole system.”); }else if([[UIApplication sharedApplication] backgroundRefreshStatus] == UIBackgroundRefreshStatusRestricted) { NSLog(@”Background updates are unavailable and the … Read more

Fixed gradient background with css

If you wish to do this using CSS3 gradients, try using the background-attachment property For example, if you are applying your gradients to #background, then add this after the CSS gradient. background-attachment: fixed; Note: You must add background-attachment after the background properties. Your entire code might look like this: #background { background: #1e5799; background: -webkit-gradient(linear, … Read more

How to set Ripple effect on a LinearLayout programmatically?

You can use this way. if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { // If we’re running on Honeycomb or newer, then we can use the Theme’s // selectableItemBackground to ensure that the View has a pressed state TypedValue outValue = new TypedValue(); this.getTheme().resolveAttribute(android.R.attr.selectableItemBackground, outValue, true); textView.setBackgroundResource(outValue.resourceId); }

UITableView cell with background image

For Cell cell.backgroundView = [[UIImageView alloc] initWithImage:[ [UIImage imageNamed:@”cell_normal.png”] stretchableImageWithLeftCapWidth:0.0 topCapHeight:5.0] ]; cell.selectedBackgroundView = [[UIImageView alloc] initWithImage:[ [UIImage imageNamed:@”cell_pressed.png”] stretchableImageWithLeftCapWidth:0.0 topCapHeight:5.0] ]; For Tableview [mEditTableView setBackgroundView:nil]; [mEditTableView setBackgroundView:[[UIImageView alloc] initWithImage:[UIImage imageNamed:@”apple.png”]] ];

How do I start playing audio when in silent mode & locked in iOS 6?

You need to make couple of changes in plist file. i.e. 1) Set Required background mode to App plays audio 2) set Application does not run in background to YES. NSError *setCategoryErr = nil; NSError *activationErr = nil; [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayback error:&setCategoryErr]; [[AVAudioSession sharedInstance] setActive:YES error:&activationErr]; Then, you need to write these much code … Read more

didReceiveRemoteNotification:fetchCompletionHandler not being called when app is in background and not connected to Xcode

There could be number of things might have gone wrong, The first from my own experience. In order to make silent push notification work. Your payload has to be structured correctly, { “aps” : { “content-available” : 1 }, “data-id” : 345 } Does your push message has content-available: 1 if not then iOS will … Read more

Iframe transparent background

I’ve used this creating an IFrame through Javascript and it worked for me: // IFrame points to the IFrame element, obviously IFrame.src=”https://stackoverflow.com/questions/1234127/about: blank”; IFrame.style.backgroundColor = “transparent”; IFrame.frameBorder = “0”; IFrame.allowTransparency=”true”; Not sure if it makes any difference, but I set those properties before adding the IFrame to the DOM. After adding it to the DOM, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)