How to detect whether custom keyboard is activated from the keyboard’s container app?

Here is a method I have used in one of my projects. I think it is what you asked for, hope it helps you. – (BOOL)isCustomKeyboardEnabled { NSString *bundleID = @”com.company.app.customkeyboard”; // Replace this string with your custom keyboard’s bundle ID NSArray *keyboards = [[[NSUserDefaults standardUserDefaults] dictionaryRepresentation] objectForKey:@”AppleKeyboards”]; // Array of all active keyboards for … Read more

iOS 8 / Safari 8 not working with ASP.NET AJAX-Extensions

Beware that this solution is only applicable to .NET version < 4.0 So here it is… Working UA: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36 Not working UA: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/600.1.17 (KHTML, like Gecko) Version/7.1 Safari/537.85.10 The problem lies in the major version-change to AppleWebKit/600. ASP.NET … Read more

NavigationBar bar, tint, and title text color in iOS 8

In AppDelegate.swift, in application(_:didFinishLaunchingWithOptions:) I put the following: UINavigationBar.appearance().barTintColor = UIColor(red: 234.0/255.0, green: 46.0/255.0, blue: 73.0/255.0, alpha: 1.0) UINavigationBar.appearance().tintColor = UIColor.white UINavigationBar.appearance().titleTextAttributes = [NSAttributedString.Key.foregroundColor : UIColor.white] (For Swift 4 or earlier use NSAttributedStringKey instead of NSAttributedString.Key) For titleTextAttributes, the docs say: You can specify the font, text color, text shadow color, and text shadow offset … Read more

Array of tuples in Swift

It looks to me like resultArray.append() is treating the tuple a little bit like a variadic parameter, and trying to expand the tuple to match its own arguments. It’s complaining about your second parameter because it’s only expecting one. I haven’t seen this behavior for Array.append() documented anywhere, so I would say it’s a bug … Read more

IOS 8 Tab Bar Item Background Colour

In your tabBarController, you can set the default UITabBar tintColor, barTintColor, selectionIndicatorImage (cheating a bit here) and renderingMode of the images, see comments below: class MyTabBarController: UITabBarController, UINavigationControllerDelegate { … override func viewDidLoad() { … // Sets the default color of the icon of the selected UITabBarItem and Title UITabBar.appearance().tintColor = UIColor.redColor() // Sets the … Read more

Displaying search bar in navigation bar in iOS 8

According to Apple : UISearchDisplayController is deprecated in iOS 8. (Note that UISearchDisplayDelegate is also deprecated.) To manage the presentation of a search bar and display search results in iOS 8 and later, instead use UISearchController. The UISearchController class defines an interface that manages the presentation of a search bar in concert with the search … Read more