UISearchResultsUpdating
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 becomes the first responder (Ok) or changes are made to the text (Ok) or scope of the search bar (NOT Ok).” What to do to get notified when the scope changes? Gerriet. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: My Phone does not work upside down
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 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 Portrait (bottom home button) works, no Portrait (top home button). What do I have to do, to make it work upside down on iPhones? Xcode 6.3, iOS 8.3. Gerriet. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/rols%40rols.org This email sent to r...@rols.org ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Getting at NSTextFinder from text view
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 new string. Right? No, there's no crash -- and it doesn't fail. In fact, the odd behavior I was alluding to actually seems to be a normal inconsistency in the find bar's behavior. 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: 2015-04-14 14:04:07.719 An uncaught exception was raised 2015-04-14 14:04:07.719 *** NSRunStorage, _NSBlockNumberForIndex(): index (1560) beyond array bounds (452) :( -- Shane Stanley sstan...@myriad-com.com.au www.macosxautomation.com/applescript/apps/ ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/martin.hewitson%40aei.mpg.de This email sent to martin.hewit...@aei.mpg.de ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Getting at NSTextFinder from text view
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 shorter string and: This is what I'm doing in my text view subclass: [self setIncrementalSearchingEnabled:NO]; [self.textFinder noteClientStringWillChange]; // modify textStorage here [self setIncrementalSearchingEnabled:YES]; Seems to be working in my (admittedly limited) testing. -- Shane Stanley sstan...@myriad-com.com.au www.macosxautomation.com/applescript/apps/ ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Getting at NSTextFinder from text view
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, at 07:20, Martin Hewitson martin.hewit...@aei.mpg.de wrote: Alas, this doesn’t actually help. If I do this, then switch out the text storage, then the very next time the user hits cmd-f the old search results are highlighted again, but of course over the wrong text, and potentially out of range. My impression is that the -cancelFindIndicator doesn’t clear the last search, just removes it from the screen. Then when bringing back the find bar (after a cancel) the old results are assumed still to be ok, rather than being recalculated. At this point you need to re-cache the data the find bar is using. In my case, because I’m implementing the NSTextFinderClient protocol, I simply rebuild the model that is the store of text to search (an array of dictionaries as it happens). When the text finder asks for its data it is thus correct and up to date. 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 instance completely? Perhaps changing it’s content and wrapping with editing calls would work? : [textStorage beginEditing]; [textStorage setAttributedString:theNewAttributedString]; [textStorage endEditing]; Maybe there’s another way to inform the parent textView that it’s content has been changed. Shane, in your case I agree, -noteClientStringWillChange sounds like exactly the method that’s needed. I can’t see how to get to the textView’s textFinder either. You can get to the *findBar* with [[self.textView enclosingScrollView] findBarView] but that’s just an NSView and likely to not be helpful. If you’re not creating your own textFinder (and it seems from Martin’s experience that even if you do it doesn’t work) then the only thing I can think of is to somehow notify the textView that its content has changed and hope and presume that it has an internal mechanism for also notifying its textFinder. Sorry I can’t be more helpful. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Getting at NSTextFinder from text view
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 NSTextStorage out without notifying the text view of the change? Are you swapping the textStorage instance completely? Perhaps changing it’s content and wrapping with editing calls would work? : [textStorage beginEditing]; [textStorage setAttributedString:theNewAttributedString]; [textStorage endEditing]; Maybe there’s another way to inform the parent textView that it’s content has been changed. FWIW, the above make no difference here. Shane, in your case I agree, -noteClientStringWillChange sounds like exactly the method that’s needed. I can’t see how to get to the textView’s textFinder either. You can get to the *findBar* with [[self.textView enclosingScrollView] findBarView] but that’s just an NSView and likely to not be helpful. If you’re not creating your own textFinder (and it seems from Martin’s experience that even if you do it doesn’t work) then the only thing I can think of is to somehow notify the textView that its content has changed and hope and presume that it has an internal mechanism for also notifying its textFinder. I implemented my own text finder and used -noteClientStringWillChange, and still no luck. What *seems* to be working is to disable incremental searching first, changing the text, then enabling it again. I use this elsewhere to get around another bug with text finder, at someone from Apple's suggestion. Depending on the state of the text finder at the time, it behaves a little differently for the first subsequent search, but that's a relatively small price to pay. 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? It seems a lot of overhead for each time I modify the text, so maybe there's some way I can test if a search is active first. -- Shane Stanley sstan...@myriad-com.com.au www.macosxautomation.com/applescript/apps/ ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
My Phone does not work upside down
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 Portrait (bottom home button) works, no Portrait (top home button). What do I have to do, to make it work upside down on iPhones? Xcode 6.3, iOS 8.3. Gerriet. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Getting at NSTextFinder from text view
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 the textStorage instance completely? Perhaps changing it’s content and wrapping with editing calls would work? : [textStorage beginEditing]; [textStorage setAttributedString:theNewAttributedString]; [textStorage endEditing]; Maybe there’s another way to inform the parent textView that it’s content has been changed. FWIW, the above make no difference here. Shane, in your case I agree, -noteClientStringWillChange sounds like exactly the method that’s needed. I can’t see how to get to the textView’s textFinder either. You can get to the *findBar* with [[self.textView enclosingScrollView] findBarView] but that’s just an NSView and likely to not be helpful. If you’re not creating your own textFinder (and it seems from Martin’s experience that even if you do it doesn’t work) then the only thing I can think of is to somehow notify the textView that its content has changed and hope and presume that it has an internal mechanism for also notifying its textFinder. I implemented my own text finder and used -noteClientStringWillChange, and still no luck. What *seems* to be working is to disable incremental searching first, changing the text, then enabling it again. I use this elsewhere to get around another bug with text finder, at someone from Apple's suggestion. Depending on the state of the text finder at the time, it behaves a little differently for the first subsequent search, but that's a relatively small price to pay. It seems a lot of overhead for each time I modify the text, so maybe there's some way I can test if a search is active first. -- Shane Stanley sstan...@myriad-com.com.au www.macosxautomation.com/applescript/apps/ ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Getting at NSTextFinder from text view
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 odd behavior I was alluding to actually seems to be a normal inconsistency in the find bar's behavior. -- Shane Stanley sstan...@myriad-com.com.au www.macosxautomation.com/applescript/apps/ ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: My Phone does not work upside down
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 shows Landscape. 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? No it does not: iPhone refuses to work upside down. If so, what are the supported interface orientations for that app? Do not understand the question. Look at your main view controller's - (NSUInteger)supportedInterfaceOrientations. The default return value for iPad is UIInterfaceOrientationMaskAll, but for iPhone it's UIInterfaceOrientationMaskAllButUpsideDown. If you're not overriding that, you won't get upside down on the iPhone. -- Glenn L. Austin, Computer Wizard and Race Car Driver http://www.austinsoft.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: My Phone does not work upside down
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 DetailViewController : UIViewController Exactly - and if you look at the generated storyboard or NIB or XIB you’ll see that the root view controller is 1) in the case of the iPhone master-detail app a Navigation controller 2) in the case of the iPad master-detail app, a SplitView controller. Neither of those are the MasterViewController nor the DetailViewController so implementing the method in those doesn’t do a thing for you. However, and again as I pointed out in the third line of my original reply (with reference to NavigationViewController at that time as you were taking about an iPhone app), look at the delegate methods. Both UINavigationController and UISplitViewController have delegates which have methods which allow you to specify the supportedInterfaceOrientations *without* subclassing them. Those methods are there for exactly that. I just created a SplitViewController : UISplitViewController, which implements just one method: supportedInterfaceOrientations and now everything works as intended. So: what is the point of the checkboxes and Info.plist? it’s meant to be a global statement of intent. So if you have a universal app where you have custom UIViewControllers and they support all orientations you don’t have to put, in every one, if( isIphone ) return one_load_of_stuff; else return another_load_of_stuff; You return the modes that your viewcontroller supports and the global plist lets you then remove the upside down one when you’re on a phone. The one thing I’ve never understood is why ‘upside down portrait’ is discouraged on the phone. My large iPhone is hardly smaller than my small iPad, it works just fine upside down really, I never knew where the HID guideline came from that thou-shalt-not-hold-thy-iphone-upside-down. So I always check the box and override the method and allow myself an illicit mode. Anyway. Thanks to your help I have it now working. Thanks a lot! Kind regards, Gerriet. +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. When I click on Target → General I see under “Deployment Info - Device Orientation” 4 checkboxes, which look friendly enough. Only the first two (Portrait and Upside Down) are selected. But iPad works in all 4 orientations. Seams that the Info.plist overrides the friendly checkboxes. And iPhone works only in Portrait - NOT upside down. No, the Info.plist *is* the friendly checkboxes, they are one and the same. The boxes you select there are what ends up in the Info.plist file. It has separate sets of boxes for iPhone and iPad, which one are you looking at, the iPhone one only I suspect. And, again per the documentation you’ve been reading The default values for a view controller's supported interface orientations is set to UIInterfaceOrientationMaskAll for the iPad idiom and UIInterfaceOrientationMaskAllButUpsideDown for the iPhone idiom. Kind regards, Gerriet. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: My Phone does not work upside down
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 to keep it really obvious that you’re holding your phone the wrong way up. —Jens * Wasn’t this a running gag on the old TV show “Get Smart”? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: My Phone does not work upside down
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 interface orientations for that app? On Apr 14, 2015, at 10:44 AM, Gerriet M. Denkmann wrote: 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 says Upside Down? Only the first two: Portrait and Upside Down. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: My Phone does not work upside down
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 says Upside Down? Only the first two: Portrait and Upside Down. On Apr 14, 2015, at 10:35 AM, Gerriet M. Denkmann 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 to supportedInterfaceOrientations: All my subclasses of UIViewController have this implemented - none gets ever called. - (NSUInteger)supportedInterfaceOrientations { UIInterfaceOrientationMask mask = UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone ? UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown : UIInterfaceOrientationMaskAll; NSLog(@“%s %#lx”,__FUNCTION__,mask); ← never seen this return mask; } +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. When I click on Target → General I see under “Deployment Info - Device Orientation” 4 checkboxes, which look friendly enough. Only the first two (Portrait and Upside Down) are selected. But iPad works in all 4 orientations. Seams that the Info.plist overrides the friendly checkboxes. And iPhone works only in Portrait - NOT upside down. Kind regards, Gerriet. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com This email sent to z...@mac.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: My Phone does not work upside down
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 to supportedInterfaceOrientations: All my subclasses of UIViewController have this implemented - none gets ever called. - (NSUInteger)supportedInterfaceOrientations { UIInterfaceOrientationMask mask = UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone ? UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown : UIInterfaceOrientationMaskAll; NSLog(@“%s %#lx”,__FUNCTION__,mask); ← never seen this return mask; } Which of them would you have expected to be called? Which one is the root view controller or topmost presented view controller that fills the window? As per the documentation the system calls this method on the root view controller or the topmost presented view controller that fills the window +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. When I click on Target → General I see under “Deployment Info - Device Orientation” 4 checkboxes, which look friendly enough. Only the first two (Portrait and Upside Down) are selected. But iPad works in all 4 orientations. Seams that the Info.plist overrides the friendly checkboxes. And iPhone works only in Portrait - NOT upside down. No, the Info.plist *is* the friendly checkboxes, they are one and the same. The boxes you select there are what ends up in the Info.plist file. It has separate sets of boxes for iPhone and iPad, which one are you looking at, the iPhone one only I suspect. And, again per the documentation you’ve been reading The default values for a view controller's supported interface orientations is set to UIInterfaceOrientationMaskAll file:///Users/rols/Library/Developer/Shared/Documentation/DocSets/com.apple.adc.documentation.iOS.docset/Contents/Resources/Documents/documentation/UIKit/Reference/UIApplication_Class/index.html#//apple_ref/c/econst/UIInterfaceOrientationMaskAll for the iPad idiom and UIInterfaceOrientationMaskAllButUpsideDown file:///Users/rols/Library/Developer/Shared/Documentation/DocSets/com.apple.adc.documentation.iOS.docset/Contents/Resources/Documents/documentation/UIKit/Reference/UIApplication_Class/index.html#//apple_ref/c/econst/UIInterfaceOrientationMaskAllButUpsideDown for the iPhone idiom. Kind regards, Gerriet. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: My Phone does not work upside down
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. 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 UIViewController and in a section elsewhere about view rotation (which could do with updating for the changes which have occurred in the myriad years *since* iOS6 but is still basically correct). ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: My Phone does not work upside down
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 label with text in the only screen and made sure to select Portrait and Upside Down, does that function as expected? No it does not: iPhone refuses to work upside down. If so, what are the supported interface orientations for that app? Do not understand the question. On Apr 14, 2015, at 10:44 AM, Gerriet M. Denkmann wrote: 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 says Upside Down? Only the first two: Portrait and Upside Down. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: My Phone does not work upside down
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 what the special sauce is now so that the Device Orientation settings are actually obeyed when Upside Down is checked? I'll check Stack Overflow. Argh. 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 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 text in the only screen and made sure to select Portrait and Upside Down, does that function as expected? No it does not: iPhone refuses to work upside down. If so, what are the supported interface orientations for that app? Do not understand the question. On Apr 14, 2015, at 10:44 AM, Gerriet M. Denkmann wrote: 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 says Upside Down? Only the first two: Portrait and Upside Down. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: My Phone does not work upside down
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 ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: My Phone does not work upside down
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 implemented - none gets ever called. - (NSUInteger)supportedInterfaceOrientations { UIInterfaceOrientationMask mask = UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone ? UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown : UIInterfaceOrientationMaskAll; NSLog(@“%s %#lx”,__FUNCTION__,mask); ← never seen this return mask; } +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. When I click on Target → General I see under “Deployment Info - Device Orientation” 4 checkboxes, which look friendly enough. Only the first two (Portrait and Upside Down) are selected. But iPad works in all 4 orientations. Seams that the Info.plist overrides the friendly checkboxes. And iPhone works only in Portrait - NOT upside down. Kind regards, Gerriet. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: My Phone does not work upside down
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 in UIViewController and in a section elsewhere about view rotation (which could do with updating for the changes which have occurred in the myriad years *since* iOS6 but is still basically correct). ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: My Phone does not work upside down
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 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 to supportedInterfaceOrientations: All my subclasses of UIViewController have this implemented - none gets ever called. - (NSUInteger)supportedInterfaceOrientations { UIInterfaceOrientationMask mask = UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone ? UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown : UIInterfaceOrientationMaskAll; NSLog(@“%s %#lx”,__FUNCTION__,mask); ← never seen this return mask; } +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. When I click on Target → General I see under “Deployment Info - Device Orientation” 4 checkboxes, which look friendly enough. Only the first two (Portrait and Upside Down) are selected. But iPad works in all 4 orientations. Seams that the Info.plist overrides the friendly checkboxes. And iPhone works only in Portrait - NOT upside down. Kind regards, Gerriet. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com This email sent to z...@mac.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: My Phone does not work upside down
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 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 text in the only screen and made sure to select Portrait and Upside Down, does that function as expected? No it does not: iPhone refuses to work upside down. If so, what are the supported interface orientations for that app? Do not understand the question. On Apr 14, 2015, at 10:44 AM, Gerriet M. Denkmann wrote: 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 says Upside Down? Only the first two: Portrait and Upside Down. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: My Phone does not work upside down
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. Excellent advice. I have been following this since hours. As to supportedInterfaceOrientations: All my subclasses of UIViewController have this implemented - none gets ever called. - (NSUInteger)supportedInterfaceOrientations { UIInterfaceOrientationMask mask = UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone ? UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown : UIInterfaceOrientationMaskAll; NSLog(@“%s %#lx”,__FUNCTION__,mask); ← never seen this return mask; } Which of them would you have expected to be called? Which one is the root view controller or topmost presented view controller that fills the window? As per the documentation “the system calls this method on the root view controller or the topmost presented view controller that fills the window I obviously have some problems understanding the documentation. My app is just the what Xcode gives me for iOS Master-Detail. There are MasterViewController (UITableViewController) and DetailViewController : UIViewController I just created a SplitViewController : UISplitViewController, which implements just one method: supportedInterfaceOrientations and now everything works as intended. So: what is the point of the checkboxes and Info.plist? Anyway. Thanks to your help I have it now working. Thanks a lot! Kind regards, Gerriet. +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. When I click on Target → General I see under “Deployment Info - Device Orientation” 4 checkboxes, which look friendly enough. Only the first two (Portrait and Upside Down) are selected. But iPad works in all 4 orientations. Seams that the Info.plist overrides the friendly checkboxes. And iPhone works only in Portrait - NOT upside down. No, the Info.plist *is* the friendly checkboxes, they are one and the same. The boxes you select there are what ends up in the Info.plist file. It has separate sets of boxes for iPhone and iPad, which one are you looking at, the iPhone one only I suspect. And, again per the documentation you’ve been reading The default values for a view controller's supported interface orientations is set to UIInterfaceOrientationMaskAll for the iPad idiom and UIInterfaceOrientationMaskAllButUpsideDown for the iPhone idiom. Kind regards, Gerriet. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
How to safely delete a WebView delegate object?
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 but a delegate object is not pointed by 2 different WebViews. I have a delete button that does something like: myArrayremoveAtIndex(lastIndex) 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] Does this smell? Any tip I should have in mind for situations like this? -- Juanjo Conti jjconti http://goog_2023646312@carouselapps.com jjco...@carouselapps.com Software Engineer - Carousel Apps https://carouselapps.com -- Carousel Apps Limited, registered in England Wales with registered number 7689440 and registered office Unit 2 Artbrand Studios, 7 Leathermarket Street, London SE1 3HN. Any communication sent by or on behalf of Carousel App Ltd or any of its subsidiary, holding or affiliated companies or entities (together Watu) is confidential and may be privileged or otherwise protected. If you receive it in error please inform us and then delete it from your system. You should not copy it or disclose its contents to anyone. Messages sent to and from Watu may be monitored to ensure compliance with our internal policies and to protect our business. Emails are not secure and cannot be guaranteed to be error free. Anyone who communicates with us by email is taken to accept these risks. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: How to safely delete a WebView delegate object?
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 [MyDelegate retain] Does this smell? Any tip I should have in mind for situations like this? It smells of a memory management error. Delegates are, in most of the modern Cocoa classes, unretained objects, and your array (with its strong references to your delegates) is what’s keeping them alive. When you remove the array element, the strong reference disappears, and your delegate can get deallocated, leading to such crashes. You should make sure you’re setting the various delegate properties in the WebView to nil before removing the array element. (It’s too late to do it after, unless you’ve taken a local strong reference to the delegate before removing.) At least, this is what it sounds like. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
How to remove iPad popover?
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 → UISplitViewControllerDisplayModePrimaryHidden) How can I do this from code? The obvious way would be: splitViewController.displayMode = UISplitViewControllerDisplayModePrimaryHidden; but displayMode is readonly. iOS 8.3 Gerriet. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: How to remove iPad popover?
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 = UISplitViewControllerDisplayModePrimaryOverlay) When I tap on the DetailView, the MasterView slides away. (i.e. splitViewController.displayMode → UISplitViewControllerDisplayModePrimaryHidden) How can I do this from code? The obvious way would be: splitViewController.displayMode = UISplitViewControllerDisplayModePrimaryHidden; but displayMode is readonly. iOS 8.3 Gerriet. Let’s see if the documentation contains any hints here .. documentation on UISplitViewController’s displayMode .. To change the current display mode, change the value of the preferredDisplayMode property.” I’d probably try that I read this as meaning “set the general behaviour”. Indeed: when I set preferredDisplayMode = UISplitViewControllerDisplayModePrimaryHidden then the Primary stays hidden, even if I rotate the iPad to landscape. This is NOT what I want. I want: [ splitViewController hideThePrimaryViewExactlyAsWhenOneTappsOnTheSecondaryView ]; Kind regards, Gerriet. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: How to remove iPad popover?
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, the MasterView slides away. (i.e. splitViewController.displayMode → UISplitViewControllerDisplayModePrimaryHidden) How can I do this from code? The obvious way would be: splitViewController.displayMode = UISplitViewControllerDisplayModePrimaryHidden; but displayMode is readonly. iOS 8.3 Gerriet. Let’s see if the documentation contains any hints here .. documentation on UISplitViewController’s displayMode .. To change the current display mode, change the value of the preferredDisplayMode property.” I’d probably try that ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: How to remove iPad popover?
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 storyboard); and then in splitViewController:willHideViewController:withBarButtonItem:forPopoverController:, record the popover controller in a property, which you can use later. You can also use this popover controller to programmatically show the popover when you need to. If there is an easier way, I would love to hear about it. Cheers, Dave On Apr 14, 2015, at 10:13 PM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: 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 = UISplitViewControllerDisplayModePrimaryOverlay) When I tap on the DetailView, the MasterView slides away. (i.e. splitViewController.displayMode → UISplitViewControllerDisplayModePrimaryHidden) How can I do this from code? The obvious way would be: splitViewController.displayMode = UISplitViewControllerDisplayModePrimaryHidden; but displayMode is readonly. iOS 8.3 Gerriet. Let’s see if the documentation contains any hints here .. documentation on UISplitViewController’s displayMode .. To change the current display mode, change the value of the preferredDisplayMode property.” I’d probably try that I read this as meaning “set the general behaviour”. Indeed: when I set preferredDisplayMode = UISplitViewControllerDisplayModePrimaryHidden then the Primary stays hidden, even if I rotate the iPad to landscape. This is NOT what I want. I want: [ splitViewController hideThePrimaryViewExactlyAsWhenOneTappsOnTheSecondaryView ]; Kind regards, Gerriet. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/dave.fernandes%40utoronto.ca This email sent to dave.fernan...@utoronto.ca ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: How to remove iPad popover?
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 UISplitViewControllerDelegate object to the UISplitViewController (I instantiate one in the storyboard); and then in splitViewController:willHideViewController:withBarButtonItem:forPopoverController:, record the popover controller in a property, which you can use later. This sounds like a good idea; only: this method is deprecated since 8.0. The suggestion is: “Implement the splitViewController:willChangeToDisplayMode: method instead.” Sadly this replacement does not mention the popover controller. You can also use this popover controller to programmatically show the popover when you need to. If there is an easier way, I would love to hear about it. 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. By the way: UIStoryboardPopoverSegue has a popoverController property. But then: how to get the UIStoryboardPopoverSegue ? Kind regards, Gerriet. Cheers, Dave On Apr 14, 2015, at 10:13 PM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: 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 = UISplitViewControllerDisplayModePrimaryOverlay) When I tap on the DetailView, the MasterView slides away. (i.e. splitViewController.displayMode → UISplitViewControllerDisplayModePrimaryHidden) How can I do this from code? The obvious way would be: splitViewController.displayMode = UISplitViewControllerDisplayModePrimaryHidden; but displayMode is readonly. iOS 8.3 Gerriet. Let’s see if the documentation contains any hints here .. documentation on UISplitViewController’s displayMode .. To change the current display mode, change the value of the preferredDisplayMode property.” I’d probably try that I read this as meaning “set the general behaviour”. Indeed: when I set preferredDisplayMode = UISplitViewControllerDisplayModePrimaryHidden then the Primary stays hidden, even if I rotate the iPad to landscape. This is NOT what I want. I want: [ splitViewController hideThePrimaryViewExactlyAsWhenOneTappsOnTheSecondaryView ]; Kind regards, Gerriet. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
NSTableView content height
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’d love to get a better suggestion. -- *Alex Kac - **President and Founder* *Web Information Solutions, Inc.* ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: How to remove iPad popover?
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. But then: how to get the UIStoryboardPopoverSegue ? Segues are transient objects that only exist, and there is no reason to suspect that UISplitViewController uses them to present the popover. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Getting at NSTextFinder from text view
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 word like “the”. Then I switch to the second text storage which has a much shorter string and: This is what I'm doing in my text view subclass: [self setIncrementalSearchingEnabled:NO]; [self.textFinder noteClientStringWillChange]; // modify textStorage here [self setIncrementalSearchingEnabled:YES]; Seems to be working in my (admittedly limited) testing. 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]; -- Shane Stanley sstan...@myriad-com.com.au www.macosxautomation.com/applescript/apps/ ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/martin.hewitson%40aei.mpg.de This email sent to martin.hewit...@aei.mpg.de ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Getting at NSTextFinder from text view
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 textStorage] setAttributedString:string]; -- Shane Stanley sstan...@myriad-com.com.au www.macosxautomation.com/applescript/apps/ ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com