tableView:indexPathForCell returns nil

It could be that the cell is not visible at this moment. tableView:indexPathForCell returns nil in this situation. I solved this using indexPathForRowAtPoint this method works even if the cell is not visible. The code: UITableViewCell *cell = textField.superview.superview; NSIndexPath *indexPath = [self.tableView indexPathForRowAtPoint:cell.center];

Triggering a specific action when the app enters foreground from a local notification in iOS? (using swift)

If I want a view controller to be notified when the app is brought back to the foreground, I might just register for the UIApplication.willEnterForegroundNotification notification (bypassing the app delegate method entirely): class ViewController: UIViewController { private var observer: NSObjectProtocol? override func viewDidLoad() { super.viewDidLoad() observer = NotificationCenter.default.addObserver(forName: UIApplication.willEnterForegroundNotification, object: nil, queue: .main) { [unowned … Read more

how to increase font size in UIWebView

I have 2 buttons – A- and A+ @interface NSUInteger textFontSize; – (IBAction)changeTextFontSize:(id)sender { switch ([sender tag]) { case 1: // A- textFontSize = (textFontSize > 50) ? textFontSize -5 : textFontSize; break; case 2: // A+ textFontSize = (textFontSize < 160) ? textFontSize +5 : textFontSize; break; } NSString *jsString = [[NSString alloc] initWithFormat:@”document.getElementsByTagName(‘body’)[0].style.webkitTextSizeAdjust=”%d%%””, … Read more

ITMS-90809: Deprecated API Usage – existing app that use UIWebView are no longer accepted

Yes, Apple did change the policies Are you using ionic? if so, install these: cordova plugin add cordova-plugin-ionic-webview@latest npm install @ionic-native/ionic-webview Then add this to your config.xml under ios platform: <preference name=”WKWebViewOnly” value=”true” /> <feature name=”CDVWKWebViewEngine”>` <param name=”ios-package” value=”CDVWKWebViewEngine” /> </feature> <preference name=”CordovaWebViewEngine” value=”CDVWKWebViewEngine” /> Finally run ionic cordova prepare ios to reflect the changes … Read more

Allow unverified ssl certificates in WKWebView

This is fixed in iOS 9! WKWebView finally makes calls to webView(_:didReceiveAuthenticationChallenge:completionHandler:) on WKNavigationDelegate. Unfortunately this does not work if you run code built in Xcode 7 on iOS 8 devices (at least not in my initial testing). In my example below, I’m not actually doing anything with the cert and just letting it pass … Read more

ios8 iPad uiwebview crashes while displaying popover when user taps drop down list HTML select tag

The solution mentioned in the question did not help me, however it did point me in the right direction. After some investigation I would say it’s some sort of race condition between presenting and removing the popover. As a workaround you can postpone the presentation in the delegate of the UIWebView: -(void)presentViewController:(UIViewController *)viewControllerToPresent animated:(BOOL)flag completion:(void … Read more

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