|
Design Pattern Help Needed
I have what must be a common problem, and am looking for some architectural suggestions.
Over the years, I've built custom objects (e.g., popup calendars, button menus, etc) which have now been
I have what must be a common problem, and am looking for some architectural suggestions.
Over the years, I've built custom objects (e.g., popup calendars, button menus, etc) which have now been
|
By
Rick Aurbach
·
#1284
·
|
|
Automated connecting to a WiFi network.
I’m wondering if anyone thinks it’s remotely possible to automatically connect an iOS device to a WiFi network with user permission.
Sort of select a network, wait for a network access over
I’m wondering if anyone thinks it’s remotely possible to automatically connect an iOS device to a WiFi network with user permission.
Sort of select a network, wait for a network access over
|
By
Alex Zavatone
·
#1283
·
|
|
UISplitViewController and iOS14
I have a storyboard-based app based on a split-view. I have edited the split view as shown in the attached screenshot.
My goal is to have a single storyboard that will handle both iPhone and iPad
I have a storyboard-based app based on a split-view. I have edited the split view as shown in the attached screenshot.
My goal is to have a single storyboard that will handle both iPhone and iPad
|
By
Rick Aurbach
·
#1282
·
|
|
Re: CATiledLayer in NSView (Mac) -- how?
OK, I have this problem generally solved.
There’s one more thing I’d like to ask though - when a tile draws to the screen, it is animated. In some cases that’s annoying, like when something
OK, I have this problem generally solved.
There’s one more thing I’d like to ask though - when a tile draws to the screen, it is animated. In some cases that’s annoying, like when something
|
By
Graham Cox
·
#1281
·
|
|
Re: Data structures and user interaction conundrum
Thanks to everyone who chipped in so far — interesting ideas.
The zOrder is in fact a float (CGFloat, so 64 bit), but as Jens points out, it can’t go on indefinitely.
In experimenting with this,
Thanks to everyone who chipped in so far — interesting ideas.
The zOrder is in fact a float (CGFloat, so 64 bit), but as Jens points out, it can’t go on indefinitely.
In experimenting with this,
|
By
Graham Cox
·
#1280
·
|
|
CATiledLayer in NSView (Mac) -- how?
Does anyone have sample code or just a few hints how to use CATiledLayer in a NSView on Mac?
I’m reasonably au fait with using layers in a view in general, but this one is very minimally documented
Does anyone have sample code or just a few hints how to use CATiledLayer in a NSView on Mac?
I’m reasonably au fait with using layers in a view in general, but this one is very minimally documented
|
By
Graham Cox
·
#1279
·
|
|
Determine System Time Format (12hr vs 24hr)
I have been using the following code to determine if a system is set to 12hr or 24hr time for sometime…
NSString *formatStringForHours = [NSDateFormatter dateFormatFromTemplate:@"j"
I have been using the following code to determine if a system is set to 12hr or 24hr time for sometime…
NSString *formatStringForHours = [NSDateFormatter dateFormatFromTemplate:@"j"
|
By
Sandor Szatmari
·
#1278
·
|
|
Re: Data structures and user interaction conundrum
Sadly, this only postpones the problem — you run out of precision after a while. A 64-bit double only has about 52 bits of mantissa, meaning that some sequences of 52 reorders will cause a
Sadly, this only postpones the problem — you run out of precision after a while. A 64-bit double only has about 52 bits of mantissa, meaning that some sequences of 52 reorders will cause a
|
By
Jens Alfke
·
#1277
·
|
|
Re: Data structures and user interaction conundrum
Graham,
I am picturing a radix trie with n-bit keys where n is 32 or 64—whichever suits your z-orders. Keys represent the z order. Each object is a leaf in the trie. In each object, store its
Graham,
I am picturing a radix trie with n-bit keys where n is 32 or 64—whichever suits your z-orders. Keys represent the z order. Each object is a leaf in the trie. In each object, store its
|
By
David Young
·
#1276
·
|
|
Re: Data structures and user interaction conundrum
Are the zObjects integers? If so would it help to make them floats? Intial value 3.0; Back one 2.9 or 2.09; Forward one 3.1 or 3.01?
Or have I not understood your architecture or the memory
Are the zObjects integers? If so would it help to make them floats? Intial value 3.0; Back one 2.9 or 2.09; Forward one 3.1 or 3.01?
Or have I not understood your architecture or the memory
|
By
Peter Teeson
·
#1275
·
|
|
Data structures and user interaction conundrum
Hi all,
I Have an interesting little problem, thought I’d throw it out there and see if it stirs up any discussion….
Graphics app, wherein the user can draw stuff - arbitrary vectors on a canvas.
Hi all,
I Have an interesting little problem, thought I’d throw it out there and see if it stirs up any discussion….
Graphics app, wherein the user can draw stuff - arbitrary vectors on a canvas.
|
By
Graham Cox
·
#1274
·
|
|
Re: Abstracting a group of commonly named Selectors
I learned a lot from this thread - thanks!
I learned a lot from this thread - thanks!
|
By
robmartin@frontiernet.net
·
#1273
·
|
|
Re: Abstracting a group of commonly named Selectors
Jeff,
Switch languages!!! Noooo…
Jeff,
Switch languages!!! Noooo…
|
By
Sandor Szatmari
·
#1272
·
|
|
Re: Abstracting a group of commonly named Selectors
Jeff,
Couldn’t agree more…There is no need to optimize for performance here… higher level Obj-c interfaces are preferable.
Yes, lots of efficiencies can be made. Unfortunately, it’s just not
Jeff,
Couldn’t agree more…There is no need to optimize for performance here… higher level Obj-c interfaces are preferable.
Yes, lots of efficiencies can be made. Unfortunately, it’s just not
|
By
Sandor Szatmari
·
#1271
·
|
|
Re: Abstracting a group of commonly named Selectors
On review, one thing. Don't do this:if ( [self respondsToSelector:sel] == NO )
It's a boolean method, never use an equality check for "true" or "false" on a boolean method, even if it seems to work,
On review, one thing. Don't do this:if ( [self respondsToSelector:sel] == NO )
It's a boolean method, never use an equality check for "true" or "false" on a boolean method, even if it seems to work,
|
By
Jeff Laing
·
#1270
·
|
|
Re: Abstracting a group of commonly named Selectors
This capability of Objective-C, to create classes on the fly, is one of the primo reasons why I can't understand people's fascination with Swift. Even C# can do this sort of thing, but people these
This capability of Objective-C, to create classes on the fly, is one of the primo reasons why I can't understand people's fascination with Swift. Even C# can do this sort of thing, but people these
|
By
Jeff Laing
·
#1269
·
|
|
Re: Abstracting a group of commonly named Selectors
Jeff,
Works great! See my implementation below…
The one thing I wasn’t sure about was the types array argument for class_addMethod() The fourth param…
I used ‘i’ to specify the return type
Jeff,
Works great! See my implementation below…
The one thing I wasn’t sure about was the types array argument for class_addMethod() The fourth param…
I used ‘i’ to specify the return type
|
By
Sandor Szatmari
·
#1268
·
|
|
Re: Abstracting a group of commonly named Selectors
Jeff,
So what you’re suggesting is…
1. Define a template implementation
2. Associate each selector pattern with that implementation
That seems like it should work. I’ll give it a try and let
Jeff,
So what you’re suggesting is…
1. Define a template implementation
2. Associate each selector pattern with that implementation
That seems like it should work. I’ll give it a try and let
|
By
Sandor Szatmari
·
#1267
·
|
|
Re: Abstracting a group of commonly named Selectors
In the designated initialise of your Parser class, you can use class_addMethod to add whatever you like to your instance's
In the designated initialise of your Parser class, you can use class_addMethod to add whatever you like to your instance's
|
By
Jeff Laing
·
#1266
·
|
|
Re: Abstracting a group of commonly named Selectors
Jeff,
Thanks for the idea… it might be a good choice… as for additional details.
The caller can be seen as a controller. It dynamically allocates model (parser) classes based on context.
The
Jeff,
Thanks for the idea… it might be a good choice… as for additional details.
The caller can be seen as a controller. It dynamically allocates model (parser) classes based on context.
The
|
By
Sandor Szatmari
·
#1265
·
|