UISearchResultsUpdating

2015-04-14 Thread Gerriet M. Denkmann
Using UISearchController with an UISearchBar with 3 scope buttons (xCode 6.3, iOS 8.3) I never get notified when the scope changes. The documentation about updateSearchResultsForSearchController in UISearchResultsUpdating says: “This method is automatically called whenever the search bar

Re: My Phone does not work upside down

2015-04-14 Thread Roland King
Read the manual. UIViewController supportedInterfacOrientations and if you’re using a nav controller at the top-level then look at its delegate methods. On 14 Apr 2015, at 19:03, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: I created a new project, iOS, Master-Detail and edited

Re: Getting at NSTextFinder from text view

2015-04-14 Thread Martin Hewitson
On 14 Apr 2015, at 13:30, Shane Stanley sstan...@myriad-com.com.au wrote: On 14 Apr 2015, at 9:19 pm, Martin Hewitson martin.hewit...@aei.mpg.de wrote: But if it fails for the first subsequent search, then the crashes will still happen if the old search results are out of range of the

Re: Getting at NSTextFinder from text view

2015-04-14 Thread Shane Stanley
On 14 Apr 2015, at 10:05 pm, Martin Hewitson martin.hewit...@aei.mpg.de wrote: Hmm, are you sure about this? I was just able to produce one. In my first text storage I have a long string and search for a common word like “the”. Then I switch to the second text storage which has a much

Re: Getting at NSTextFinder from text view

2015-04-14 Thread Mark Wright
I’m afraid I may not be too helpful here because in my case I’m not using an NSTextView, rather mine is a custom view that displays text in various ‘cells’ so I had to implement the full textFinderClient protocol and build a corpus of searchable text for it to query against. On 14 Apr 2015,

Re: Getting at NSTextFinder from text view

2015-04-14 Thread Martin Hewitson
On 14 Apr 2015, at 13:11, Shane Stanley sstan...@myriad-com.com.au wrote: On 14 Apr 2015, at 8:39 pm, Mark Wright blue.bucon...@virgin.net wrote: It would seem that in both your cases NSTextView should be fully aware of all this by itself. Perhaps the problem is in switching the

My Phone does not work upside down

2015-04-14 Thread Gerriet M. Denkmann
I created a new project, iOS, Master-Detail and edited Info.plist: Supported interface orientations = Portrait (bottom home button) and Portrait (top home button). Supported interface orientations (iPad) contains all 4 orientations (unchanged) Run on iPad → as expected But run on iPhone, only

Re: Getting at NSTextFinder from text view

2015-04-14 Thread Shane Stanley
On 14 Apr 2015, at 8:39 pm, Mark Wright blue.bucon...@virgin.net wrote: It would seem that in both your cases NSTextView should be fully aware of all this by itself. Perhaps the problem is in switching the NSTextStorage out without notifying the text view of the change? Are you swapping

Re: Getting at NSTextFinder from text view

2015-04-14 Thread Shane Stanley
On 14 Apr 2015, at 9:19 pm, Martin Hewitson martin.hewit...@aei.mpg.de wrote: But if it fails for the first subsequent search, then the crashes will still happen if the old search results are out of range of the new string. Right? No, there's no crash -- and it doesn't fail. In fact, the

Re: My Phone does not work upside down

2015-04-14 Thread Glenn L. Austin
On Apr 14, 2015, at 8:06 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: On 14 Apr 2015, at 21:54, Alex Zavatone z...@mac.com wrote: What happens when you select them all? Are the left and right landscape supported? iPad unchanged: all 4 orientations ok. iPhone: upside down

Re: My Phone does not work upside down

2015-04-14 Thread Roland King
On 14 Apr 2015, at 23:28, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: I obviously have some problems understanding the documentation. Indeed. My app is just the what Xcode gives me for iOS Master-Detail. There are MasterViewController (UITableViewController) and

Re: My Phone does not work upside down

2015-04-14 Thread Jens Alfke
On Apr 14, 2015, at 8:44 AM, Roland King r...@rols.org wrote: The one thing I’ve never understood is why ‘upside down portrait’ is discouraged on the phone. I think it’s because holding your phone upside down is a really bad idea when you try to use it as a _phone_*. So maybe Apple wants

Re: My Phone does not work upside down

2015-04-14 Thread Alex Zavatone
What happens when you select them all? Are the left and right landscape supported? If you were to create a brand new 1 view iOS app with just a label with text in the only screen and made sure to select Portrait and Upside Down, does that function as expected? If so, what are the supported

Re: My Phone does not work upside down

2015-04-14 Thread Gerriet M. Denkmann
On 14 Apr 2015, at 21:40, Alex Zavatone z...@mac.com wrote: So, just to be clear, when you click on your Target iOS app and select General in the main window and scroll down to Deployment Info, all the little check boxes next to Device Orientation are checked? Including the one that

Re: My Phone does not work upside down

2015-04-14 Thread Roland King
On 14 Apr 2015, at 22:35, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: On 14 Apr 2015, at 21:21, Jens Alfke j...@mooseyard.com wrote: On Apr 14, 2015, at 4:57 AM, Roland King r...@rols.org wrote: Read the manual. Excellent advice. I have been following this since hours. As

Re: My Phone does not work upside down

2015-04-14 Thread Alex Zavatone
Tells you the last time I needed to check and see how to make the phone display upside down. On Apr 14, 2015, at 11:25 AM, Roland King wrote: On 14 Apr 2015, at 23:18, Alex Zavatone z...@mac.com wrote: Hope this helps.

Re: My Phone does not work upside down

2015-04-14 Thread Gerriet M. Denkmann
On 14 Apr 2015, at 21:54, Alex Zavatone z...@mac.com wrote: What happens when you select them all? Are the left and right landscape supported? iPad unchanged: all 4 orientations ok. iPhone: upside down shows Landscape. If you were to create a brand new 1 view iOS app with just a

Re: My Phone does not work upside down

2015-04-14 Thread Alex Zavatone
Well, DAMN. I just tried the same with one of my little projects under Xcode 6.2, iOS 8.1.3 . iPhone 6. All 4 orientations are checked. Turning the phone upside down never redraws the view. Same on an iPhone 5s with iOS 7.1.1. Same on an iPod Touch with iOS 6.1.3. Argh. Does anyone know

Re: My Phone does not work upside down

2015-04-14 Thread Jens Alfke
On Apr 14, 2015, at 4:57 AM, Roland King r...@rols.org wrote: Read the manual. +1. In addition to what Roland said, it’s also staring you right in the face in the General tab of the target settings as a set of friendly checkboxes. —Jens ___

Re: My Phone does not work upside down

2015-04-14 Thread Gerriet M. Denkmann
On 14 Apr 2015, at 21:21, Jens Alfke j...@mooseyard.com wrote: On Apr 14, 2015, at 4:57 AM, Roland King r...@rols.org wrote: Read the manual. Excellent advice. I have been following this since hours. As to supportedInterfaceOrientations: All my subclasses of UIViewController have this

Re: My Phone does not work upside down

2015-04-14 Thread Roland King
On 14 Apr 2015, at 23:18, Alex Zavatone z...@mac.com wrote: Hope this helps. http://stackoverflow.com/questions/27525657/ios-8-upside-down-orientation-xcode-option-enabled-still-doenst-work So frustrating. It’s not frustrating. It’s been like that since iOS6, it’s very-well-documented

Re: My Phone does not work upside down

2015-04-14 Thread Alex Zavatone
So, just to be clear, when you click on your Target iOS app and select General in the main window and scroll down to Deployment Info, all the little check boxes next to Device Orientation are checked? Including the one that says Upside Down? On Apr 14, 2015, at 10:35 AM, Gerriet M. Denkmann

Re: My Phone does not work upside down

2015-04-14 Thread Alex Zavatone
Hope this helps. http://stackoverflow.com/questions/27525657/ios-8-upside-down-orientation-xcode-option-enabled-still-doenst-work So frustrating. On Apr 14, 2015, at 11:06 AM, Gerriet M. Denkmann wrote: On 14 Apr 2015, at 21:54, Alex Zavatone z...@mac.com wrote: What happens when you

Re: My Phone does not work upside down

2015-04-14 Thread Gerriet M. Denkmann
On 14 Apr 2015, at 22:00, Roland King r...@rols.org wrote: On 14 Apr 2015, at 22:35, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: On 14 Apr 2015, at 21:21, Jens Alfke j...@mooseyard.com wrote: On Apr 14, 2015, at 4:57 AM, Roland King r...@rols.org wrote: Read the manual.

How to safely delete a WebView delegate object?

2015-04-14 Thread Juanjo Conti
Hi there! This is my scenario: I have a Swift Array containing Dictionaries where the keys are the strings delegate and webView. The corresponding values are WebView instances and a delegate object per webView. Each WebView has all its *delegate properties pointing to the same delegate object

Re: How to safely delete a WebView delegate object?

2015-04-14 Thread Quincey Morris
On Apr 14, 2015, at 17:01 , Juanjo Conti jjco...@carouselapps.com wrote: If I click the button too many times, fast enough, my app crash with a EXEC_ error and if I enable zombie objects I get that it crash when one of this two messages is been send: [MyDelegate respondsToSelector] or

How to remove iPad popover?

2015-04-14 Thread Gerriet M. Denkmann
On iPad (portrait orientation) there is on the left a MasterView, overlapping the DetailView. (i.e. splitViewController.displayMode = UISplitViewControllerDisplayModePrimaryOverlay) When I tap on the DetailView, the MasterView slides away. (i.e. splitViewController.displayMode →

Re: How to remove iPad popover?

2015-04-14 Thread Gerriet M. Denkmann
On 15 Apr 2015, at 08:59, Roland King r...@rols.org wrote: On 15 Apr 2015, at 09:49, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: On iPad (portrait orientation) there is on the left a MasterView, overlapping the DetailView. (i.e. splitViewController.displayMode =

Re: How to remove iPad popover?

2015-04-14 Thread Roland King
On 15 Apr 2015, at 09:49, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: On iPad (portrait orientation) there is on the left a MasterView, overlapping the DetailView. (i.e. splitViewController.displayMode = UISplitViewControllerDisplayModePrimaryOverlay) When I tap on the DetailView,

Re: How to remove iPad popover?

2015-04-14 Thread Dave Fernandes
You can dismiss the master popover using -[UIPopoverController dismissPopoverAnimated:] However, getting the popover controller in the first place is a bit of a pain. The only way I know is to provide a UISplitViewControllerDelegate object to the UISplitViewController (I instantiate one in the

Re: How to remove iPad popover?

2015-04-14 Thread Gerriet M. Denkmann
On 15 Apr 2015, at 09:32, Dave Fernandes dave.fernan...@utoronto.ca wrote: You can dismiss the master popover using -[UIPopoverController dismissPopoverAnimated:] However, getting the popover controller in the first place is a bit of a pain. The only way I know is to provide a

NSTableView content height

2015-04-14 Thread Alex Kac
I’m failing to find the proper way to do this. Given an NSTableView, I’d like to size its parent view to the height of all the rows/content/headers of that table view so that there is no scrolling. Someone suggested: [_scrollView.documentView frame].size.height But that does not work for me.

Re: How to remove iPad popover?

2015-04-14 Thread Kyle Sluder
On Tue, Apr 14, 2015, at 11:49 PM, Gerriet M. Denkmann wrote: And if there is any way (easy or not) to get this (in a non-deprecated way), I would be very interested to hear about it. There is not. Please file a Radar. By the way: UIStoryboardPopoverSegue has a popoverController property.

Re: Getting at NSTextFinder from text view

2015-04-14 Thread Martin Hewitson
On 14 Apr 2015, at 14:22, Shane Stanley sstan...@myriad-com.com.au wrote: On 14 Apr 2015, at 10:05 pm, Martin Hewitson martin.hewit...@aei.mpg.de wrote: Hmm, are you sure about this? I was just able to produce one. In my first text storage I have a long string and search for a common

Re: Getting at NSTextFinder from text view

2015-04-14 Thread Shane Stanley
On 14 Apr 2015, at 11:18 pm, Martin Hewitson martin.hewit...@aei.mpg.de wrote: Yeah, that’s what I’m doing, and I managed to create that crash. When you modify the textStorage, do you swap it out? I’m doing [self.layoutManager replaceTextStorage:textStorage]; No -- I'm doing: [[self