Post not yet marked as solved
I want to build that gets notified (even when in the background) when it gets in range of any iBeacon with a given UUID.I know I could monitor an individual region for each of my beacons, but if I understand correctly, on iOS, I am limited to 20 monitored regions.So the other alternative is to monitor a region based solely on its UUID, but then when do I get enter/exit notifications for that region? Whenever I get in range or out of range of any beacon with the same UUID, or only when I get in range of the first one and out of range of the last one?
Post not yet marked as solved
I’m desperately trying to add a vertically-aligned button with image on top of the title as the titleView of a navigation bar. I would like the size of the image in the button to be fixed and the image to be scaled to fill it. Basically, I’m trying to reproduce what you have in Tinder’s conversation navigation bar. Unfortunately, as soon as I add an image to my button, it seems to remove the title, and the image takes the whole available width of the navigation bar. Has anybody here done something like that before?
Post not yet marked as solved
I'm trying to create image files at runtime by composing vector image assets on MacOS, and I've never done any custom drawing before. There is a lot of documentation out there about the latest frameworks like SceneKit and so on, but I'm having a lot of trouble finding up-to-date documentation about simple drawing, using Swift for code samples and on MacOS, not iOS. Wherever I look, I keep coming back to this Introduction to Cocoa Drawing but it hasn't been updated since 2012, all the sample code is in Objective-C and I'm not even sure that it's still relevant since the first page explicitly states that "This document is no longer being updated."Is there a more up-to-date version of this document somewhere in Apple's documentation, or any online course, book or other resource you would recommend for an absolute Core Graphics newbie, that just wants to understand what he's doing instead of copy/pasting code from StackOverflow?
Post not yet marked as solved
I'm trying to add a UISearchController to a UIViewController that contains a UITableView (and an MKMapView too, but hopefully that's not the problem). I followed Ray Wenderlich's tutorial but I can't get the same result in terms of behaviour.Here is my viewDidLoad:override func viewDidLoad() {
super.viewDidLoad()
searchController.searchResultsUpdater = self
searchController.obscuresBackgroundDuringPresentation = false
searchController.searchBar.placeholder = NSLocalizedString("Search references by project, customer or city", comment: "")
if #available(iOS 11.0, *) {
navigationItem.searchController = searchController
navigationItem.hidesSearchBarWhenScrolling = true
} else {
tableView.tableHeaderView = searchController.searchBar
}
definesPresentationContext = true
self.modeSelector.layer.cornerRadius = 5.0
if let split = splitViewController {
let controllers = split.viewControllers
detailViewController = (controllers[controllers.count - 1] as! UINavigationController).topViewController as? ReferenceViewController
}
}Note that the #available test in the middle is because I need to support iOS up to 9.1.Now I see several problems:The search bar appears right away and I can't hide it by scrollingWhen I focus the search bar, the top of the tableview doesn't stick to the bottom of the navigation item:The only major difference I see with Ray Wenderlich's sample project is that since I created my project with XCode 9, my storyboard doesn't use top and bottom layout guides, but safe areas. Don't know if it's relevant, but that's the only thing I see.Any idea what's going on and how I could fix this?