Re: 12 hr vs 24 hr time display

2017-01-03 Thread Alex Zavatone
OK. All that NSLocale stuff seemed like "The right way to do it™" but… Let's see if this gets you what you want. Read this file: ~/Library/Preferences/ com.apple.menuextra.clock.plist And you'll see… http://www.apple.com/DTDs/PropertyList-1.0.dtd;> EEE h:mm Or

Re: 12 hr vs 24 hr time display

2017-01-03 Thread Alex Zavatone
On Jan 3, 2017, at 8:02 PM, Sandor Szatmari wrote: > Alex, > > On Jan 3, 2017, at 19:51, Alex Zavatone wrote: > >> >> On Jan 3, 2017, at 3:02 PM, Sandor Szatmari wrote: >> >>> Gary, >>> On Jan 3, 2017, at 14:52, Gary L. Wade wrote:

Re: 12 hr vs 24 hr time display

2017-01-03 Thread Sandor Szatmari
Alex, > On Jan 3, 2017, at 19:51, Alex Zavatone wrote: > > >> On Jan 3, 2017, at 3:02 PM, Sandor Szatmari wrote: >> >> Gary, >> >>> On Jan 3, 2017, at 14:52, Gary L. Wade wrote: >>> >>> Is there a problem with using +[NSDateFormatter >>>

Re: 12 hr vs 24 hr time display

2017-01-03 Thread Alex Zavatone
On Jan 3, 2017, at 3:02 PM, Sandor Szatmari wrote: > Gary, > >> On Jan 3, 2017, at 14:52, Gary L. Wade wrote: >> >> Is there a problem with using +[NSDateFormatter >> localizedStringFromDate:dateStyle:timeStyle:]? Depending on your needs, you >> might also

Re: 12 hr vs 24 hr time display

2017-01-03 Thread Gary L. Wade
In that case, see if a call like this would work for you in all supported locales: Objective-C formattedDate = [NSDateFormatter localizedStringFromDate:date dateStyle:NSDateFormatterNoStyle timeStyle:NSDateFormatterShortStyle]; or: Swift let formattedDate =

Re: 12 hr vs 24 hr time display

2017-01-03 Thread Sandor Szatmari
Gary, > On Jan 3, 2017, at 18:40, Gary L. Wade wrote: > > What I’m getting at is how relevant is it to your app that you know if and > where the time-of-day indicators exist in addition to the 24-hour setting. > Answering those questions should be what

Re: 12 hr vs 24 hr time display

2017-01-03 Thread Gary L. Wade
What I’m getting at is how relevant is it to your app that you know if and where the time-of-day indicators exist in addition to the 24-hour setting. Answering those questions should be what determines your next steps. As mentioned, the alarm clock has a long history on the Mac whereas the

Re: Animating autolayout constraint changes for subviews

2017-01-03 Thread Doug Hill
Just out of curiosity, is it feasible to override the animation of an animatable property to implement this? For example, generating the layer contents with the reflowed text for a keyframe animation as the frame size changes. Presumably I could do this be overriding the behavior for animating

Re: AVFoundation and the main thread

2017-01-03 Thread Mailing Lists
From my experience in shipping multiple complex AVFoundation apps, you can safely (assuming you know what you are actually doing) • : Build AVAssets / Build AVMutableCompositions Build AVVideoCompositors / Build AVVideoCompositionLayerInstructions Build AVPlayerItems Build

Re: Cocoa-dev Digest, Vol 13, Issue 518

2017-01-03 Thread Jonathan Prescott
I think that your expectation that presentViewController would retain a strong reference to the view controller is not right. I would put the release after the dismissal code has run. Now, you really don’t need the view controller. Jonathan > On Dec 17, 2016, at 3:00 PM,

Re: UINavigationBar content margins in UIPresentationController subclass

2017-01-03 Thread David Duncan
The most relevant looking bug I can find seems to involve pushing & popping view controllers. That said, setting the preferredContentSize on the navigation controller directly should always work. Alternatively you could use your own container view controller instead. > On Dec 7, 2016, at 10:42

Re: 12 hr vs 24 hr time display

2017-01-03 Thread Sandor Szatmari
Sean, > On Jan 3, 2017, at 15:32, Sean McBride wrote: > > On Tue, 3 Jan 2017 11:26:48 -0500, Sandor Szatmari said: > >> What I was asking for clarity on is the fact that there is no way to >> detect that the user prefers 24 hr time display if they only choose >> method

Re: 12 hr vs 24 hr time display

2017-01-03 Thread Sandor Szatmari
Gary, > On Jan 3, 2017, at 14:52, Gary L. Wade wrote: > > Is there a problem with using +[NSDateFormatter > localizedStringFromDate:dateStyle:timeStyle:]? Depending on your needs, you > might also consider +[NSCalendar autoupdatingCurrentCalendar]. I am looking

Re: 12 hr vs 24 hr time display

2017-01-03 Thread Sean McBride
On Tue, 3 Jan 2017 11:26:48 -0500, Sandor Szatmari said: >What I was asking for clarity on is the fact that there is no way to >detect that the user prefers 24 hr time display if they only choose >method 1, the Date & Time checkbox. Should I allow my users to set 12 >hr time but override it to

Re: 12 hr vs 24 hr time display

2017-01-03 Thread Sandor Szatmari
Quincey, > On Jan 3, 2017, at 14:46, Quincey Morris > wrote: > >> On Jan 3, 2017, at 05:00 , Sandor Szatmari >> wrote: >> >> Are you suggesting case sensitivity is an issue here? If so, I don't think >> so. The template

Re: 12 hr vs 24 hr time display

2017-01-03 Thread Gary L. Wade
Is there a problem with using +[NSDateFormatter localizedStringFromDate:dateStyle:timeStyle:]? Depending on your needs, you might also consider +[NSCalendar autoupdatingCurrentCalendar]. A user typically “sets” their region settings when they set up their Mac, and the choice of 12/24 hour

Re: 12 hr vs 24 hr time display

2017-01-03 Thread Quincey Morris
On Jan 3, 2017, at 05:00 , Sandor Szatmari wrote: > > Are you suggesting case sensitivity is an issue here? If so, I don't think > so. The template returned from this method uses 'a' as a place holder for > AM/PM. e.g. It might return the string 'h a' as it

Re: 12 hr vs 24 hr time display

2017-01-03 Thread Sandor Szatmari
Alex, > On Jan 3, 2017, at 13:47, Alex Zavatone wrote: > > iOS or Mac? > > In any case, this will help you out to no end. > > http://NSDateformatter.com/ Thanks, I'll check this out. > > And note that the case of the letters you use in your formatter matter. I don't think I

Re: 12 hr vs 24 hr time display

2017-01-03 Thread Alex Zavatone
iOS or Mac? In any case, this will help you out to no end. http://NSDateformatter.com/ And note that the case of the letters you use in your formatter matter. GL. - Alex Zavatone On Jan 3, 2017, at 12:16 AM, Sandor Szatmari wrote: > I am working on a small application where the primary

Finalizing CVPixelBuffer while lock count is 1

2017-01-03 Thread Torsten Curdt
While doing some image processing I am also trying to detect QR codes from an image buffer. The following code works just fine func captureOutput(_ captureOutput: AVCaptureOutput, didOutputSampleBuffer sampleBuffer: CMSampleBuffer, from connection: AVCaptureConnection) { if

Re: 12 hr vs 24 hr time display

2017-01-03 Thread Sandor Szatmari
Steve, > On Jan 3, 2017, at 12:28, Steve Christensen wrote: > >> On Jan 3, 2017, at 8:26 AM, Sandor Szatmari >> wrote: >> >> Steve, >> >>> On Jan 3, 2017, at 10:17, Steve Christensen wrote: >>> >>> In the Date & Time

Re: 12 hr vs 24 hr time display

2017-01-03 Thread Steve Christensen
On Jan 3, 2017, at 8:26 AM, Sandor Szatmari wrote: > > Steve, > >> On Jan 3, 2017, at 10:17, Steve Christensen wrote: >> >> In the Date & Time preference panel, I assume that you're referring to the >> option on the Clock tab. If so, those

Re: 12 hr vs 24 hr time display

2017-01-03 Thread Sandor Szatmari
Jeremy, > On Jan 3, 2017, at 10:30, Jeremy Pereira > wrote: > > >> On 3 Jan 2017, at 06:16, Sandor Szatmari >> wrote: >> >> I am working on a small application where the primary function is to display >> the time to the

Re: 12 hr vs 24 hr time display

2017-01-03 Thread Sandor Szatmari
Steve, > On Jan 3, 2017, at 10:17, Steve Christensen wrote: > > In the Date & Time preference panel, I assume that you're referring to the > option on the Clock tab. If so, those settings refer only to the menubar > clock display. I just think it's weird that there are two

Re: 12 hr vs 24 hr time display

2017-01-03 Thread Steve Christensen
In the Date & Time preference panel, I assume that you're referring to the option on the Clock tab. If so, those settings refer only to the menubar clock display. If you notice in that same preference panel, on the Date & Time tab, there is a message at the bottom that says, "To set date and

Re: 12 hr vs 24 hr time display

2017-01-03 Thread Sandor Szatmari
Quincy, Sandor > On Jan 3, 2017, at 04:35, Quincey Morris > wrote: > >> On Jan 2, 2017, at 22:16 , Sandor Szatmari >> wrote: >> >> There are supported methods using: (works with method 2) >>NSString *format =

Re: UIModalPresentationFormSheet on iPad and iPhone

2017-01-03 Thread Andreas Falkenhahn
Solved this now. Of course I can just add all the GUI controls to another subview and then center this subview in the root view's frame. This makes the GUI look good on both iPad and iPhone. On 02.01.2017 at 17:59 Andreas Falkenhahn wrote: > As described in the docs, view controllers that have

Re: 12 hr vs 24 hr time display

2017-01-03 Thread Quincey Morris
On Jan 2, 2017, at 22:16 , Sandor Szatmari wrote: > > There are supported methods using: (works with method 2) >NSString *format = [NSDateFormatter dateFormatFromTemplate:@"j" options:0 > locale:[NSLocale currentLocale]]; >BOOL is24Hour = ([format

12 hr vs 24 hr time display

2017-01-03 Thread Sandor Szatmari
I am working on a small application where the primary function is to display the time to the user. My hope was to honor the user's preference setting. I am either missing something or honoring the user's preference is harder than expected. So, there are two places to set 24 hr time display.