Master - Detail: How to get back?

2015-04-14 Thread Gerriet M. Denkmann
Using the Xcode template: iOS - Master-Detail, the Detail view has (in the top left corner) a Back-Button, which works fine. Now I added another UIBarButtonItem called: “Do something and go back” connected to some IBAction in DetailViewController. But how to make it go back to the MasterView?

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. I’

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: How to remove iPad popover?

2015-04-14 Thread Gerriet M. Denkmann
> On 15 Apr 2015, at 09:32, Dave Fernandes 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 UISplitViewControllerDelegat

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 08:59, Roland King wrote: > > >> On 15 Apr 2015, at 09:49, Gerriet M. Denkmann wrote: >> >> On iPad (portrait orientation) there is on the left a MasterView, >> overlapping the DetailView. >> (i.e. splitViewController.displayMode = >> UISplitViewControllerDisplayModePri

Re: How to remove iPad popover?

2015-04-14 Thread Roland King
> On 15 Apr 2015, at 09:49, Gerriet M. Denkmann 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, the MasterVi

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 → UISplitViewCont

Re: How to safely delete a WebView delegate object?

2015-04-14 Thread Quincey Morris
On Apr 14, 2015, at 17:01 , Juanjo Conti 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 [MyDelegate retain] >

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: My Phone does not work upside down

2015-04-14 Thread Jens Alfke
> On Apr 14, 2015, at 8:44 AM, Roland King 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 to keep i

Re: My Phone does not work upside down

2015-04-14 Thread Roland King
> On 14 Apr 2015, at 23:28, Gerriet M. Denkmann 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 > DetailViewController : UIVie

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 wrote: >> >> Hope this helps. >> >> http://stackoverflow.com/questions/27525657/ios-8-upside-down-orienta

Re: My Phone does not work upside down

2015-04-14 Thread Gerriet M. Denkmann
> On 14 Apr 2015, at 22:00, Roland King wrote: > > >> On 14 Apr 2015, at 22:35, Gerriet M. Denkmann wrote: >> >> >>> On 14 Apr 2015, at 21:21, Jens Alfke wrote: >>> >>> On Apr 14, 2015, at 4:57 AM, Roland King wrote: Read the manual. >> >> Excellent advice. I have been

Re: My Phone does not work upside down

2015-04-14 Thread Roland King
> On 14 Apr 2015, at 23:18, Alex Zavatone 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 in U

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 wrote: >> >> What happens when you select th

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 wha

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 wrote: > > >> On 14 Apr 2015, at 21:54, Alex Zavatone 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. >

Re: My Phone does not work upside down

2015-04-14 Thread Gerriet M. Denkmann
> On 14 Apr 2015, at 21:54, Alex Zavatone 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 label with

Re: My Phone does not work upside down

2015-04-14 Thread Roland King
> On 14 Apr 2015, at 22:35, Gerriet M. Denkmann wrote: > > >> On 14 Apr 2015, at 21:21, Jens Alfke wrote: >> >> >>> On Apr 14, 2015, at 4:57 AM, Roland King wrote: >>> >>> Read the manual. > > Excellent advice. I have been following this since hours. > > As to supportedInterfaceOrientat

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 in

Re: My Phone does not work upside down

2015-04-14 Thread Gerriet M. Denkmann
> On 14 Apr 2015, at 21:40, Alex Zavatone 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 > says Upsi

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 Gerriet M. Denkmann
> On 14 Apr 2015, at 21:21, Jens Alfke wrote: > > >> On Apr 14, 2015, at 4:57 AM, Roland King wrote: >> >> Read the manual. Excellent advice. I have been following this since hours. As to supportedInterfaceOrientations: All my subclasses of UIViewController have this implemented - none get

Re: My Phone does not work upside down

2015-04-14 Thread Jens Alfke
> On Apr 14, 2015, at 4:57 AM, Roland King 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 ___ Cocoa-dev mai

Re: Getting at NSTextFinder from text view

2015-04-14 Thread Shane Stanley
On 14 Apr 2015, at 11:18 pm, Martin Hewitson 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 textStorage] setAttri

Re: Getting at NSTextFinder from text view

2015-04-14 Thread Martin Hewitson
> On 14 Apr 2015, at 14:22, Shane Stanley wrote: > > On 14 Apr 2015, at 10:05 pm, Martin Hewitson > 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 se

Re: Getting at NSTextFinder from text view

2015-04-14 Thread Shane Stanley
On 14 Apr 2015, at 10:05 pm, Martin Hewitson 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 shorter string and: This is

Re: Getting at NSTextFinder from text view

2015-04-14 Thread Martin Hewitson
> On 14 Apr 2015, at 13:30, Shane Stanley wrote: > > On 14 Apr 2015, at 9:19 pm, Martin Hewitson > 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 cra

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 wrote: > > I created a new project, iOS, Master-Detail and edited Info.plist: > > Support

Re: Getting at NSTextFinder from text view

2015-04-14 Thread Shane Stanley
On 14 Apr 2015, at 9:19 pm, Martin Hewitson 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 odd behavior I was alludi

Re: Getting at NSTextFinder from text view

2015-04-14 Thread Martin Hewitson
> On 14 Apr 2015, at 13:11, Shane Stanley wrote: > > On 14 Apr 2015, at 8:39 pm, Mark Wright 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

Re: Getting at NSTextFinder from text view

2015-04-14 Thread Shane Stanley
On 14 Apr 2015, at 8:39 pm, Mark Wright 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 the > textStorage ins

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 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, a

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 becom