Re: NSColorPanel and close box

2015-09-30 Thread Matthias Schmidt

> Am 30.09.2015 um 15:43 schrieb Jens Alfke :
> 
> 
>> On Sep 29, 2015, at 11:31 PM, Matthias Schmidt  wrote:
>> 
>> the host app is 4D, which is about moving to 64bit.
> 
> Oh my god, the database 4D? I had no idea that still existed. The company I 
> worked for in the ‚80s used to use it.

yes it does and it finally abandons the Carbon code inside :-)
Years ago I wrote a plugin in Carbon, which still works, but now 4D is moving 
to 64bit, which requires rewriting the plugin in Cocoa.
4D still has a good user base and it grew, the server can now serve more than 
1000 users - depending on the hardware of course ;-)

> 
>> I thought modal runloop mode is the default for panels or do I need to set 
>> NSModalPanelRunLoopMode somewhere else in my code?
> 
> No, you don’t want a modal runloop mode unless you have a modal window like 
> an alert. I just thought of it because it will act much like what you’re 
> saying — you can’t interact in most ways with windows that aren’t the main 
> window. You’re not calling any of the NSRunloop -runXXX methods, are you?
> 

no, I don’t.
I just call this code here:

MyPicker *meinPicker = [[MyPicker alloc] init];

   switch (mode) {
   case kFD_4DMode: // para 2 = 4D Farbe, Para 3 = Alpha Value
   [meinPicker setMyColorWith4D:col_a withColB:col_b];
   break;

   case kFD_RGB:// needs 5 parameters R-G-B-Alfa
   [meinPicker setMyColorWithRGB:col_a withColB:col_b withColC:col_c 
withColD:col_d];
   break;
   case kFD_HSV:// needs 5 parameters H-S-B-Alfa
   [meinPicker setMyColorWithHSV:col_a withColB:col_b withColC:col_c 
withColD:col_d];
   break;
   case kFD_CMYK:   // needs 6 parameters C-M-Y-K-Alfa
   [meinPicker setMyColorWithCMYK:col_a withColB:col_b withColC:col_c 
withColD:col_d withColE:col_e];
   break;
   case kFD_Gray:   // needs 3 Parameters
   [meinPicker setMyColorWithGrey:col_a withColB:col_b];
   break;
   }

   [meinPicker setPicker:meinPicker];

 while ([NSColorPanel sharedColorPanelExists]) {
   PA_Yield();
   }

// collecting data and return it to 4D

then setPicker looks like that:

-(void)setPicker:(id)sender {
   panel = [ NSColorPanel sharedColorPanel ];
   [ panel setColor: myColor ];
   [ panel setMode: (NSColorPanelMode)pMode ];
   [ panel setContinuous: YES ];
   [ panel setTarget: self ];
   [ panel setAction: @selector(changeColor:) ]; 
   [ panel setDelegate: sender];
   [panel worksWhenModal]; // this makes no difference
   [ panel makeKeyAndOrderFront: self ];
}

when windowWillClose gets fired I remove the observer, close the window and 
release it.

It all works as expected besides the dump closing box and this drives me nuts 
currently, as I couldn’t find a solution on the net yet.

cheers
Matthias




___

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: NSColorPanel and close box

2015-09-30 Thread Matthias Schmidt

> Am 30.09.2015 um 16:11 schrieb Jens Alfke :
> 
> 
> 
>> On Sep 30, 2015, at 12:04 AM, Matthias Schmidt  wrote:
>> 
>> while ([NSColorPanel sharedColorPanelExists]) {
>>   PA_Yield();
>>   }
> 
> Yikes! That looks very suspicious. You shouldn't be running loops like that 
> in a Cocoa app. AppKit is event driven, so you handle a single event and 
> return.

there is PA_RunInMainProcess((PA_RunInMainProcessProcPtr)… which would run the 
panel as modal dialog, that would be one possible approach I guess.
So I need to redesign my code and open the panel like this:
NSInteger result = [ panel runModal ];

Another would be to split the tasks, like open panel and get panel values and 
close the thing, which would require to return a reference to the panel to 4D.

I have to think about that.


> 
> It sounds like PA_Yield is running the run loop modally, which would explain 
> why the color panel won't work. If that’s the way their plugin API works, 
> it's got some problems.


it just keeps the current 4D process away from doing anything.

> 
> (Also, why did you take this off-list? Now no one else can comment.)
(you replied directly to me and I just hit reply ;-)

Matthias


___

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: questions on WebView for Mac apps

2015-09-30 Thread dangerwillrobinsondanger


> On Sep 30, 2015, at 3:12 PM, Jens Alfke  wrote:
> 
> Hey, if I liked working with JavaScript DOM APIs I’d be a web developer :-p 
> I prefer languages with fancy features, like warning me if I pass the wrong 
> number of parameters to a function. At build time, even.
No disagreement here. None at all. 
> 
> In a hybrid app you’re going to need to have some communication between the 
> web code and native code. But WKWebView hasn’t done much to enable that. On 
> the JS side you have some really limited events you can trigger, and on the 
> native side you can glom your stuff into a string of JavaScript code and pass 
> it in to be evaluated ― which isn’t just a PITA, it’s also very, very prone 
> to injection attacks if you don’t quote everything correctly.
There is at least cross site policy, but it's true JavaScript can snoop on 
JavaScript. 
> 
> You also can’t generate your own resources, except for a single HTML page. 
> Any resources loaded from that page have to have ‘real’ URLs, and any 
> navigation from that page goes to ‘real’ URLs. There’s no way to intercept 
> and override the loads, or register your own URL protocol. The workaround is 
> to run a real live in-app web server, listening on a real live TCP port. This 
> also has some serious security implications, even if you only bind it to 
> localhost.
It's feels the API is just for the apps that wrap web sites lamely right now. 

At the end of the day most hybrids trying to use web for easy UI are missing 
all the hard stuff native gives free. Accessibilty and Localization facilities 
come to mind first. 
But people keep trying to do it. 
___

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 - Detecting when user has finished scrolling

2015-09-30 Thread Peter Hudson
I would like to know when the user has finished scrolling one of my table views.
I can’t see any obvious API to do it. ( I’ve checked the scrollers, views etc 
which are part of an NSTableView)

All suggestions gratefully received.

Peter 
___

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: NSTableView - Detecting when user has finished scrolling

2015-09-30 Thread dangerwillrobinsondanger
Check the NSScrollView notifications. 
However you could try to observe changes to the NSClipView bounds.
You could also observe scroll events and so forth. 
But ultimately you will run into semantics. Resting touches, momentum phases, 
some slight ambiguity on whether the user feels done scrolling vs mentally 
figuring out if they have scrolled near where the want to go quickly and might 
stop and slow down and back up a bit. 

Question to you is, what are you trying to accomplish ?

Sent from my iPhone

> On Sep 30, 2015, at 7:45 PM, Peter Hudson  wrote:
> 
> I would like to know when the user has finished scrolling one of my table 
> views.
> I can’t see any obvious API to do it. ( I’ve checked the scrollers, views etc 
> which are part of an NSTableView)
> 
> All suggestions gratefully received.
> 
> Peter 
> ___
> 
> 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/dangerwillrobinsondanger%40gmail.com
> 
> This email sent to dangerwillrobinsondan...@gmail.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: NSTableView - Detecting when user has finished scrolling

2015-09-30 Thread Peter Hudson
Many thanks for these ideas.

As the user scrolls one of the table views, the system does not render all the 
details in the rows correctly.
The most obvious one :-  I draw my own lines between rows - inserting  
separator lines where appropriate.
Hence, I override drawRect.  The process in here to calculate the placement of 
lines is too long - hence the system, on occasions, will not draw them.

So, what I want to do is watch for when the user has finished scrolling and 
then do a display on the tableview - which works fine.

Thanks for your suggestion - I’ll check them out.

Peter




> On 30 Sep 2015, at 12:19, dangerwillrobinsondan...@gmail.com wrote:
> 
> Check the NSScrollView notifications. 
> However you could try to observe changes to the NSClipView bounds.
> You could also observe scroll events and so forth. 
> But ultimately you will run into semantics. Resting touches, momentum phases, 
> some slight ambiguity on whether the user feels done scrolling vs mentally 
> figuring out if they have scrolled near where the want to go quickly and 
> might stop and slow down and back up a bit. 
> 
> Question to you is, what are you trying to accomplish ?
> 
> Sent from my iPhone
> 
>> On Sep 30, 2015, at 7:45 PM, Peter Hudson  wrote:
>> 
>> I would like to know when the user has finished scrolling one of my table 
>> views.
>> I can’t see any obvious API to do it. ( I’ve checked the scrollers, views 
>> etc which are part of an NSTableView)
>> 
>> All suggestions gratefully received.
>> 
>> Peter 
>> ___
>> 
>> 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/dangerwillrobinsondanger%40gmail.com
>> 
>> This email sent to dangerwillrobinsondan...@gmail.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: NSTableView - Detecting when user has finished scrolling

2015-09-30 Thread dangerwillrobinsondanger
Sounds like you should be doing that in custom row views that draw the lines 
when necessary 

Sent from my iPhone

> On Sep 30, 2015, at 9:20 PM, Peter Hudson  wrote:
> 
> Many thanks for these ideas.
> 
> As the user scrolls one of the table views, the system does not render all 
> the details in the rows correctly.
> The most obvious one :-  I draw my own lines between rows - inserting  
> separator lines where appropriate.
> Hence, I override drawRect.  The process in here to calculate the placement 
> of lines is too long - hence the system, on occasions, will not draw them.
> 
> So, what I want to do is watch for when the user has finished scrolling and 
> then do a display on the tableview - which works fine.
> 
> Thanks for your suggestion - I’ll check them out.
> 
> Peter
> 
> 
> 
> 
>> On 30 Sep 2015, at 12:19, dangerwillrobinsondan...@gmail.com wrote:
>> 
>> Check the NSScrollView notifications. 
>> However you could try to observe changes to the NSClipView bounds.
>> You could also observe scroll events and so forth. 
>> But ultimately you will run into semantics. Resting touches, momentum 
>> phases, some slight ambiguity on whether the user feels done scrolling vs 
>> mentally figuring out if they have scrolled near where the want to go 
>> quickly and might stop and slow down and back up a bit. 
>> 
>> Question to you is, what are you trying to accomplish ?
>> 
>> Sent from my iPhone
>> 
>>> On Sep 30, 2015, at 7:45 PM, Peter Hudson  wrote:
>>> 
>>> I would like to know when the user has finished scrolling one of my table 
>>> views.
>>> I can’t see any obvious API to do it. ( I’ve checked the scrollers, views 
>>> etc which are part of an NSTableView)
>>> 
>>> All suggestions gratefully received.
>>> 
>>> Peter 
>>> ___
>>> 
>>> 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/dangerwillrobinsondanger%40gmail.com
>>> 
>>> This email sent to dangerwillrobinsondan...@gmail.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

Implications of disabling ATS?

2015-09-30 Thread Alex Hall
I was all excited, because--thanks to your answers re WebView--I had a system 
in place to load the contents of the first URL in the selected tweet. Then my 
log showed me "transport security has blocked…" and nothing worked.

I've since discovered that ATS is new in iOS9/OSX10.11 and is meant to force 
you into use HTTPS. Given that I'm just loading whatever URLs happen to be in 
the selected tweet, the vast majority will not be HTTPS and will thus be 
blocked. I can't add trusted domains, if I understand that feature correctly, 
because I have no way of knowing what domains users might load. My only option, 
it seems, is to disable the whole thing by using:

NSAppTransportSecurity

  
  NSAllowsArbitraryLoads
  


(found at 
http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/)

However, before I go doing that, does anyone know of a better way? Are there 
security implications I'm overlooking? I don't know what users will do with 
this web view, and yes, some may log into sites or give other sensitive data. 
The primary use case is to look at articles, videos, etc that are tweeted, 
though, and to do that I can't have ATS blocking everything. I'm not sure what 
the best course is here. Thanks.

--
Have a great day,
Alex Hall
mehg...@icloud.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

NSView - trouble setting next responder on 10.10 - works okay on 10.9

2015-09-30 Thread Jonathan Mitchell
In my app i manage the responder chain on 10.8 and 10.9 to insert the 
NSViewController into the responder chain.
The view controllers are inserted just below the NSWindowController so that 
designated view controllers can respond to actions coming up the chain from any 
source.
ie: the NSViewController for any view will NOT be the view’s next responder - 
it will be higher up in the chain.

On 10.10 the view controller is automatically assigned to be the view’s next 
responder.
I want to override this behaviour to not assign the controller as the view’s 
next responder. 
I thought this would be trivial but once the NSView nextResponder has been set 
to the controller the view seems reluctant to have its next responder changed.
The next responder remains set to the view controller;

On 10.10
The following works when linked against the 10.9 SDK but fails when linked 
again the 10.10 SDK.

@interface TestViewController : NSViewController

@end

@implementation TestViewController

- (void)setView:(NSView *)view
{
NSResponder *controlleNextResponder = self.nextResponder; // a window, the 
view is already in a nib
NSResponder *viewNextResponder = view.nextResponder;

NSLog(@"Before : %@ (== %@)", view.nextResponder, viewNextResponder);

NSView *interimResponder = [NSView new];
view.nextResponder = interimResponder;

NSLog(@"Interim : %@ (== %@)", view.nextResponder, interimResponder);

[super setView:view];

self,view.nextResponder = viewNextResponder;
self.nextResponder = controlleNextResponder;

NSLog(@"After : %@", view.nextResponder);

NSAssert(self.view.nextResponder == viewNextResponder, @"next responder is 
not restored");
}
@end

Jonathan













___

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: Implications of disabling ATS?

2015-09-30 Thread Jens Alfke

> On Sep 30, 2015, at 7:06 AM, Alex Hall  wrote:
> 
> However, before I go doing that, does anyone know of a better way? Are there 
> security implications I'm overlooking? I don't know what users will do with 
> this web view, and yes, some may log into sites or give other sensitive data. 
> The primary use case is to look at articles, videos, etc that are tweeted, 
> though, and to do that I can't have ATS blocking everything. I'm not sure 
> what the best course is here. Thanks.

You might want to use WKWebView instead, then, if all you need is a basic 
display of some Web content. Since it’s actually running in a separate process, 
your app won’t be the origin of the insecure HTTP loads, so you shouldn’t run 
into any issues with ATS.

—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: questions on WebView for Mac apps

2015-09-30 Thread Conrad Shultz
WKWebVew is the preferred API.

If WKWebView is missing API that prevents you from adopting it (on either iOS 
or OS X) please file a bug at https://bugreport.apple.com 
.

-Conrad
___

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: questions on WebView for Mac apps

2015-09-30 Thread Jens Alfke

> On Sep 30, 2015, at 10:43 AM, Conrad Shultz  wrote:
> 
> WKWebVew is the preferred API.
> 
> If WKWebView is missing API that prevents you from adopting it (on either iOS 
> or OS X) please file a bug at https://bugreport.apple.com 
> .

Really? WKWebView has like ¼ the API surface area of WebView. It’s abundantly 
obvious that it provides significantly less functionality — surely Apple 
doesn’t need developers to tell it that. I realize that WKWebView is more 
secure, and it's a step up from UIWebView, but it is in no way a replacement 
for WebView. It’s like Garage Band vs Final Cut Pro.

(Speaking of apps, this reminds me uncomfortably of what Apple’s done to the 
iWork apps (and before that, to iMovie and Aperture) — update them by removing 
massive amounts of functionality. Two years later I still can’t use the latest 
version of Pages, because it’s missing independent left/right-page margin 
settings.)

—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: Implications of disabling ATS?

2015-09-30 Thread Mike Abdullah

> On 30 Sep 2015, at 17:17, Jens Alfke  wrote:
> 
> 
>> On Sep 30, 2015, at 7:06 AM, Alex Hall  wrote:
>> 
>> However, before I go doing that, does anyone know of a better way? Are there 
>> security implications I'm overlooking? I don't know what users will do with 
>> this web view, and yes, some may log into sites or give other sensitive 
>> data. The primary use case is to look at articles, videos, etc that are 
>> tweeted, though, and to do that I can't have ATS blocking everything. I'm 
>> not sure what the best course is here. Thanks.
> 
> You might want to use WKWebView instead, then, if all you need is a basic 
> display of some Web content. Since it’s actually running in a separate 
> process, your app won’t be the origin of the insecure HTTP loads, so you 
> shouldn’t run into any issues with ATS.

In my testing so far, WKWebView is subject to the same limits still of ATS.


___

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: questions on WebView for Mac apps

2015-09-30 Thread Alex Hall
Thanks everyone. I'm now using WKWebView, but it's… odd. I see only WebView in 
the object library in Xcode, no WKWebView at all. Just because, I changed the 
class of a WebView object to WKWebView, but am now seeing my app launch, become 
unresponsive, and never actually do anything. The only error I can find points 
to my app delegate's class declaration, no help at all. I'll look this up more 
later when I get home, but so far, WebView seems to be fully supported, but 
WKWebView not so much. I may well be missing something, though. Xcode 7.1 beta, 
OS 10.11.
> On Sep 30, 2015, at 13:43, Conrad Shultz  wrote:
> 
> WKWebVew is the preferred API.
> 
> If WKWebView is missing API that prevents you from adopting it (on either iOS 
> or OS X) please file a bug at https://bugreport.apple.com 
> .
> 
> -Conrad
> ___
> 
> 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/mehgcap%40icloud.com
> 
> This email sent to mehg...@icloud.com


--
Have a great day,
Alex Hall
mehg...@icloud.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: questions on WebView for Mac apps

2015-09-30 Thread Charles Srstka
On Sep 30, 2015, at 12:43 PM, Conrad Shultz  wrote:
> 
> WKWebVew is the preferred API.
> 
> If WKWebView is missing API that prevents you from adopting it (on either iOS 
> or OS X) please file a bug at https://bugreport.apple.com 
> .

WKWebView doesn’t seem to have an item in IB’s Object Library, while WebView 
does. This would seem to be a rather large omission if the goal is to get us to 
use WKWebView instead of WebView.

Charles


___

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: questions on WebView for Mac apps

2015-09-30 Thread Jens Alfke

> On Sep 30, 2015, at 2:20 PM, Alex Hall  wrote:
> 
> Thanks everyone. I'm now using WKWebView, but it's… odd. I see only WebView 
> in the object library in Xcode, no WKWebView at all. Just because, I changed 
> the class of a WebView object to WKWebView, but am now seeing my app launch, 
> become unresponsive, and never actually do anything.

Don’t change an IB object’s class to anything but a subclass of the normal 
class!
If you need a WKWebView in a nib, drag out an NSObject and change its class.

—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: questions on WebView for Mac apps

2015-09-30 Thread Marco S Hyman
On Sep 30, 2015, at 2:20 PM, Alex Hall  wrote:
> 
> Thanks everyone. I'm now using WKWebView, but it's… odd. I see only WebView 
> in the object library in Xcode, no WKWebView at all.

No WKWebView in IB. You have to build your view in code.  At least it was that 
way last time I checked.
___

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: questions on WebView for Mac apps

2015-09-30 Thread Charles Srstka
> On Sep 30, 2015, at 4:28 PM, Jens Alfke  wrote:
> 
>> On Sep 30, 2015, at 2:20 PM, Alex Hall > > wrote:
>> 
>> Thanks everyone. I'm now using WKWebView, but it's… odd. I see only WebView 
>> in the object library in Xcode, no WKWebView at all. Just because, I changed 
>> the class of a WebView object to WKWebView, but am now seeing my app launch, 
>> become unresponsive, and never actually do anything.
> 
> Don’t change an IB object’s class to anything but a subclass of the normal 
> class!
> If you need a WKWebView in a nib, drag out an NSObject and change its class.
> 
> —Jens

Or, more correctly, an NSView (labeled as “Custom View” in IB).

Charles

___

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: questions on WebView for Mac apps

2015-09-30 Thread Alex Kac
Are you sure you’ve looked at WKWebView in its entirety? I was looking at 
converting a UIWebView and WKWebView seems to have 10x MORE API than UIWebView. 
Its just sprinkled about in a lot more classes and delegates. This is a great 
resource:



> On Sep 30, 2015, at 12:59 PM, Jens Alfke  wrote:
> 
> 
>> On Sep 30, 2015, at 10:43 AM, Conrad Shultz  wrote:
>> 
>> WKWebVew is the preferred API.
>> 
>> If WKWebView is missing API that prevents you from adopting it (on either 
>> iOS or OS X) please file a bug at https://bugreport.apple.com 
>> .
> 
> Really? WKWebView has like ¼ the API surface area of WebView. It’s abundantly 
> obvious that it provides significantly less functionality — surely Apple 
> doesn’t need developers to tell it that. I realize that WKWebView is more 
> secure, and it's a step up from UIWebView, but it is in no way a replacement 
> for WebView. It’s like Garage Band vs Final Cut Pro.
> 
> (Speaking of apps, this reminds me uncomfortably of what Apple’s done to the 
> iWork apps (and before that, to iMovie and Aperture) — update them by 
> removing massive amounts of functionality. Two years later I still can’t use 
> the latest version of Pages, because it’s missing independent left/right-page 
> margin settings.)
> 
> —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/alex%40webis.net
> 
> This email sent to a...@webis.net


Alex Kac - El capitán

Alex Kac - El capitán


___

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: Can't get dynamically sized Collection View cells

2015-09-30 Thread Doug Hill
Peter,

Thanks for the reply and the code sample. It definitely has a lot of cool stuff.

However, I’m still interested in whether anyone else has info in on 
dynamically-sized Collection View cells using the ‘estimatedItemSize’ property 
of the flow layout. Is this a lie from a WWDC presenter? Are there a number of 
other steps that aren’t documented that one needs to do? Any Apple sample code 
that implements this?

Apple experts please chime in!

Doug Hill

> On Sep 29, 2015, at 7:12 PM, Peter Tomaselli  wrote:
> 
> Hi Doug! Funny you mention this, I was trying and failing to do the same 
> thing just tonight. 
> 
> Thing is, I’ve done it before and have a toy implementation on GitHub[0] to 
> prove it! Not that that was helping me just now, of course, but perhaps a 
> link to that repo can help you out?
> 
> There are additional layers of complication in the linked project because 1. 
> the labels inside the cells are themselves line-wrapping if necessary, so 
> it’s quite “inside-out” as far as layout goes, and 2. the flow layout is 
> “left-justified” instead of “fully-justified”, so be sure to ignore those 
> aspects of the code if you do end up peeking.
> 
> Anyway, to be brutally honest I can’t for the life of me remember which of 
> the methods and/or properties in this old project are critical for getting 
> your scenario to work, and which are related solely to mine, but perhaps it’s 
> a decent starting point anyway.
> 
> IIRC there also was a gotcha here wherein setting up your cell in IB 
> basically meant you were SOL as far getting everything to work went 
> (something about subviews not being embedded in the contentView properly?), 
> but I could be wrong about that. 
> 
> Anyway a truly flowy layout is one of the things I most desire so if you gain 
> any insights more, or if anyone else can chime in with better advice, I am 
> very interested too.
> 
> — Peter
> 
> [0] https://github.com/Peterbing/CV-AutoLayout 
> 
> 
>> On Sep 29, 2015, at 6:29 PM, Doug Hill > > wrote:
>> 
>> I’m trying to implement a collection with dynamically sized cells. The WWDC  
>> session from 2014 “What’s New in Table and Collection Views” talks about how 
>> to do this by:
>> • Use autolayout constraints to set the height of the cell based on the 
>> content size of the subviews.
>> • Set the estimatedItemSize property of the flow layout object to get the 
>> scrollbars to be in close the correct location.
>> 
>> This doesn’t seem to work as I see the following log message:
>> 
>> the behavior of the UICollectionViewFlowLayout is not defined because:
>> the item width must be less than the width of the UICollectionView minus the 
>> section insets left and right values, minus the content insets left and 
>> right values.
>> Please check the values return by the delegate.
>> The relevant UICollectionViewFlowLayout instance is 
>> , and it is attached to 
>> > autoresize = RM+BM; gestureRecognizers = ; layer = 
>> ; contentOffset: {0, 0}; contentSize: {205, 66}> 
>> collection view layout: .
>> 2015-09-29 14:48:29.255 Chartcube[65578:3340001] Make a symbolic breakpoint 
>> at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the 
>> debugger.
>> 
>> also
>> the behavior of the UICollectionViewFlowLayout is not defined because:
>> the item width must be less than the width of the UICollectionView minus the 
>> section insets left and right values.
>> Please check the values return by the delegate.
>> 
>> FWIW I don’t set any other properties of the flow layout.
>> 
>> Doing a Google search leads me to the following page:
>> 
>> http://corsarus.com/2015/collection-view-with-self-sizing-cells/
>> 
>> which discusses this error message and how to add another constraint at 
>> runtime to fix it. It sets a fixed width constraint of the cell content 
>> view. This “solution” appears to be a bit of a hack since they did some 
>> trial and error to figure out how to set it so that it would make things 
>> work. This leads me to believe there’s something else going on. Also, it 
>> would be great to know why I get the error in the first place. Maybe there’s 
>> some other setting in the flow layout that needs to be made?
>> 
>> Can someone comment on how to implement dynamically-sized collection view 
>> cells correctly? Unfortunately, the WWDC session doesn’t go into detail on 
>> how they got their collection view to autoresize the cells and there’s isn’t 
>> any sample code for the project described in the video. It would be great to 
>> know the “approved” way to implement this behavior.
>> 
>> Thanks!
>> 
>> Doug Hill
>> 
>> ___
>> 
>> 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://list

Re: questions on WebView for Mac apps

2015-09-30 Thread Jens Alfke

> On Sep 30, 2015, at 2:37 PM, Alex Kac  wrote:
> 
> Are you sure you’ve looked at WKWebView in its entirety? I was looking at 
> converting a UIWebView and WKWebView seems to have 10x MORE API than 
> UIWebView. Its just sprinkled about in a lot more classes and delegates. This 
> is a great resource:

I was comparing it to the Mac OS X “WebView" class, not the iOS “UIWebView”.

I agree that WKWebView has more functionality than UIWebView. Maybe we should 
call UIWebView the “consumer version” and WKWebView “prosumer”. Neither one 
comes close to WebView Pro XL+ Ultimate Edition 2015™, though

—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: Can't get dynamically sized Collection View cells

2015-09-30 Thread Peter Tomaselli
Certainly! Just to be clear (ended up revisiting some of my research on this 
today), I don't think it is possible to do this with just estimatedItemSize 
alone. 

So, the analogy with UITableView w/r/t "self sizing", as presented or at least 
strongly implied in that WWDC talk, breaks down here—you also need a "sizing 
cell" or some other way of performing the auto layout measurements yourself and 
then providing them to the delegate. 

I would love to be told otherwise here! But I don't believe I’ve ever seen it 
done.

Peter

> On Sep 30, 2015, at 5:41 PM, Doug Hill  wrote:
> 
> Peter,
> 
> Thanks for the reply and the code sample. It definitely has a lot of cool 
> stuff.
> 
> However, I’m still interested in whether anyone else has info in on 
> dynamically-sized Collection View cells using the ‘estimatedItemSize’ 
> property of the flow layout. Is this a lie from a WWDC presenter? Are there a 
> number of other steps that aren’t documented that one needs to do? Any Apple 
> sample code that implements this?
> 
> Apple experts please chime in!
> 
> Doug Hill
> 
>> On Sep 29, 2015, at 7:12 PM, Peter Tomaselli  wrote:
>> 
>> Hi Doug! Funny you mention this, I was trying and failing to do the same 
>> thing just tonight. 
>> 
>> Thing is, I’ve done it before and have a toy implementation on GitHub[0] to 
>> prove it! Not that that was helping me just now, of course, but perhaps a 
>> link to that repo can help you out?
>> 
>> There are additional layers of complication in the linked project because 1. 
>> the labels inside the cells are themselves line-wrapping if necessary, so 
>> it’s quite “inside-out” as far as layout goes, and 2. the flow layout is 
>> “left-justified” instead of “fully-justified”, so be sure to ignore those 
>> aspects of the code if you do end up peeking.
>> 
>> Anyway, to be brutally honest I can’t for the life of me remember which of 
>> the methods and/or properties in this old project are critical for getting 
>> your scenario to work, and which are related solely to mine, but perhaps 
>> it’s a decent starting point anyway.
>> 
>> IIRC there also was a gotcha here wherein setting up your cell in IB 
>> basically meant you were SOL as far getting everything to work went 
>> (something about subviews not being embedded in the contentView properly?), 
>> but I could be wrong about that. 
>> 
>> Anyway a truly flowy layout is one of the things I most desire so if you 
>> gain any insights more, or if anyone else can chime in with better advice, I 
>> am very interested too.
>> 
>> — Peter
>> 
>> [0] https://github.com/Peterbing/CV-AutoLayout
>> 
>>> On Sep 29, 2015, at 6:29 PM, Doug Hill  wrote:
>>> 
>>> I’m trying to implement a collection with dynamically sized cells. The WWDC 
>>>  session from 2014 “What’s New in Table and Collection Views” talks about 
>>> how to do this by:
>>> • Use autolayout constraints to set the height of the cell based on the 
>>> content size of the subviews.
>>> • Set the estimatedItemSize property of the flow layout object to get the 
>>> scrollbars to be in close the correct location.
>>> 
>>> This doesn’t seem to work as I see the following log message:
>>> 
>>> the behavior of the UICollectionViewFlowLayout is not defined because:
>>> the item width must be less than the width of the UICollectionView minus 
>>> the section insets left and right values, minus the content insets left and 
>>> right values.
>>> Please check the values return by the delegate.
>>> The relevant UICollectionViewFlowLayout instance is 
>>> , and it is attached to 
>>> >> autoresize = RM+BM; gestureRecognizers = ; layer = 
>>> ; contentOffset: {0, 0}; contentSize: {205, 66}> 
>>> collection view layout: .
>>> 2015-09-29 14:48:29.255 Chartcube[65578:3340001] Make a symbolic breakpoint 
>>> at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the 
>>> debugger.
>>> 
>>> also
>>> the behavior of the UICollectionViewFlowLayout is not defined because:
>>> the item width must be less than the width of the UICollectionView minus 
>>> the section insets left and right values.
>>> Please check the values return by the delegate.
>>> 
>>> FWIW I don’t set any other properties of the flow layout.
>>> 
>>> Doing a Google search leads me to the following page:
>>> 
>>> http://corsarus.com/2015/collection-view-with-self-sizing-cells/
>>> 
>>> which discusses this error message and how to add another constraint at 
>>> runtime to fix it. It sets a fixed width constraint of the cell content 
>>> view. This “solution” appears to be a bit of a hack since they did some 
>>> trial and error to figure out how to set it so that it would make things 
>>> work. This leads me to believe there’s something else going on. Also, it 
>>> would be great to know why I get the error in the first place. Maybe 
>>> there’s some other setting in the flow layout that needs to be made?
>>> 
>>> Can someone comment on how to implement dynamically-sized collection view 
>>> cells correctly? Unfort

Re: Can't get dynamically sized Collection View cells

2015-09-30 Thread Doug Hill
There are few pieces of evidence that lead me to believe you that this hasn’t 
been done:

• A search of ADC site doesn’t show any sample code with this technique.
• A Google search turns up almost nothing, except the link I provided below.
• A search of all github and bitbucket public turns up no references to 
estimatedItemSize.

The funny thing is that I’ve implemented a dynamically sized table view cell 
using the techniques described in the WWDC presentation, and it works great. 
But there’s something about doing this with collection views that doesn’t quite 
work.

So, does Apple lie?

Thanks.

Doug Hill

> On Sep 30, 2015, at 3:54 PM, Peter Tomaselli  wrote:
> 
> Certainly! Just to be clear (ended up revisiting some of my research on this 
> today), I don't think it is possible to do this with just estimatedItemSize 
> alone. 
> 
> So, the analogy with UITableView w/r/t "self sizing", as presented or at 
> least strongly implied in that WWDC talk, breaks down here—you also need a 
> "sizing cell" or some other way of performing the auto layout measurements 
> yourself and then providing them to the delegate. 
> 
> I would love to be told otherwise here! But I don't believe I’ve ever seen it 
> done.
> 
> Peter
> 
> On Sep 30, 2015, at 5:41 PM, Doug Hill  > wrote:
> 
>> Peter,
>> 
>> Thanks for the reply and the code sample. It definitely has a lot of cool 
>> stuff.
>> 
>> However, I’m still interested in whether anyone else has info in on 
>> dynamically-sized Collection View cells using the ‘estimatedItemSize’ 
>> property of the flow layout. Is this a lie from a WWDC presenter? Are there 
>> a number of other steps that aren’t documented that one needs to do? Any 
>> Apple sample code that implements this?
>> 
>> Apple experts please chime in!
>> 
>> Doug Hill
>> 
>>> On Sep 29, 2015, at 7:12 PM, Peter Tomaselli >> > wrote:
>>> 
>>> Hi Doug! Funny you mention this, I was trying and failing to do the same 
>>> thing just tonight. 
>>> 
>>> Thing is, I’ve done it before and have a toy implementation on GitHub[0] to 
>>> prove it! Not that that was helping me just now, of course, but perhaps a 
>>> link to that repo can help you out?
>>> 
>>> There are additional layers of complication in the linked project because 
>>> 1. the labels inside the cells are themselves line-wrapping if necessary, 
>>> so it’s quite “inside-out” as far as layout goes, and 2. the flow layout is 
>>> “left-justified” instead of “fully-justified”, so be sure to ignore those 
>>> aspects of the code if you do end up peeking.
>>> 
>>> Anyway, to be brutally honest I can’t for the life of me remember which of 
>>> the methods and/or properties in this old project are critical for getting 
>>> your scenario to work, and which are related solely to mine, but perhaps 
>>> it’s a decent starting point anyway.
>>> 
>>> IIRC there also was a gotcha here wherein setting up your cell in IB 
>>> basically meant you were SOL as far getting everything to work went 
>>> (something about subviews not being embedded in the contentView properly?), 
>>> but I could be wrong about that. 
>>> 
>>> Anyway a truly flowy layout is one of the things I most desire so if you 
>>> gain any insights more, or if anyone else can chime in with better advice, 
>>> I am very interested too.
>>> 
>>> — Peter
>>> 
>>> [0] https://github.com/Peterbing/CV-AutoLayout 
>>> 
>>> 
 On Sep 29, 2015, at 6:29 PM, Doug Hill >>> > wrote:
 
 I’m trying to implement a collection with dynamically sized cells. The 
 WWDC  session from 2014 “What’s New in Table and Collection Views” talks 
 about how to do this by:
 • Use autolayout constraints to set the height of the cell based on the 
 content size of the subviews.
 • Set the estimatedItemSize property of the flow layout object to get the 
 scrollbars to be in close the correct location.
 
 This doesn’t seem to work as I see the following log message:

___

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: NSTableView - Detecting when user has finished scrolling

2015-09-30 Thread Graham Cox

> On 30 Sep 2015, at 10:20 pm, Peter Hudson  wrote:
> 
> As the user scrolls one of the table views, the system does not render all 
> the details in the rows correctly.
> The most obvious one :-  I draw my own lines between rows - inserting  
> separator lines where appropriate.
> Hence, I override drawRect.  The process in here to calculate the placement 
> of lines is too long - hence the system, on occasions, will not draw them.


Really sounds like you’re Doing It Wrong™. If you’re using a view-based table 
(as is recommended these days) then the row view should be drawing this 
separator line (a given row could be flagged to include a separator if it only 
applies to some of them). NSTableView also supports various kinds of group rows 
and overlays if that is a better fit. There are also some delegate methods that 
are intended to be used for drawing the backgrounds of rows which could also be 
used. Overriding -drawRect: on NSTableView is invariably a no-no.

If calculating which row is a separator is taking a long time, there’s 
something seriously fishy about your code, as that sort of calculation should 
be trivial. For example, if you are adding up the heights of all possible rows 
above the line, you’re probably doing far too much work - the table already 
knows which views are visible and where they are, so there should only be a few 
to consider at most.

—Graham



___

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: questions on WebView for Mac apps

2015-09-30 Thread Alex Hall

> On Sep 30, 2015, at 17:35, Charles Srstka  wrote:
> 
>> On Sep 30, 2015, at 4:28 PM, Jens Alfke > > wrote:
>> 
>>> On Sep 30, 2015, at 2:20 PM, Alex Hall >> > wrote:
>>> 
>>> Thanks everyone. I'm now using WKWebView, but it's… odd. I see only WebView 
>>> in the object library in Xcode, no WKWebView at all. Just because, I 
>>> changed the class of a WebView object to WKWebView, but am now seeing my 
>>> app launch, become unresponsive, and never actually do anything.
>> 
>> Don’t change an IB object’s class to anything but a subclass of the normal 
>> class!
>> If you need a WKWebView in a nib, drag out an NSObject and change its class.
> 
> Or, more correctly, an NSView (labeled as “Custom View” in IB).
> 
So I can be sure I'm correct: Apple wants everyone to use the new WKWebView 
class instead of WebView, but to use it, I have to build it from scratch? I'll 
look into it, but that seems an odd decision. Even in 7.1, I don't see 
WKWebView available in the Object Library.

--
Have a great day,
Alex Hall
mehg...@icloud.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: Can't get dynamically sized Collection View cells

2015-09-30 Thread Roland King

> On 1 Oct 2015, at 07:57, Doug Hill  wrote:
> 
> There are few pieces of evidence that lead me to believe you that this hasn’t 
> been done:
> 
> • A search of ADC site doesn’t show any sample code with this technique.
> • A Google search turns up almost nothing, except the link I provided below.
> • A search of all github and bitbucket public turns up no references to 
> estimatedItemSize.
> 
> The funny thing is that I’ve implemented a dynamically sized table view cell 
> using the techniques described in the WWDC presentation, and it works great. 
> But there’s something about doing this with collection views that doesn’t 
> quite work.
> 
> So, does Apple lie?
> 
> Thanks.
> 
> Doug Hill


Nope - you actually made me go and test it. Made a little UIView which has an 
intrinsic content size and can randomize that, and set 
invalidateIntrinsicContentSize() when it does). Put a UICollectionView in the 
storyboard and set up the one cell to have one of those views in it, pinned to 
all sides. Set up the datasource to make 1 section, 100 such cells and dequeued 
one cell for each. Started them all off at 150x150. 

Set collectionView.collectionViewLayout.estimatedSize to 100x100. 

Result, 150x150 boxes on the screen neatly laid out. 

Hooked up a button to iterate the cells on screen, find the embedded randomView 
and call its randomize function to reset the intrinsic content size, after they 
were all done, called collectionView.collectionViewLayout.invalidateLayout()

Result, boxes all showed up in their new randomized sizes and the layout 
adjusted everything to fit, changed the number of boxes per line and the size 
of the lines. So just having cells with a fully-specified intrinsicContentSize 
and setting estimatedSize on the collection view flowlayout is enough to get 
dynamic cells without having to measure them or do any other work. So I deduce 
from that that Apple doesn’t lie and it does actually work as the WWDC session 
says. 

I did get some quite cool crashes when I set the estimated size far from the 
actual size, were I actually trying to do this for real I’d probably look into 
it but .. since I’m not. 
___

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