Re: App store question regarding Big Sur

2020-09-18 Thread Jeff Kelley via Cocoa-dev
The behavior you describe has been the way the App Store has worked since the first major macOS update after its release; I wouldn’t expect that to change. Your users are likely *already* using Big Sur, at least some of them, on beta versions. Jeff Kelley slauncha...@gmail.com | @SlaunchaMan

Reconnecting to a NetService after a stream error

2017-05-03 Thread Jeff Kelley
(for instance, is there a hard number of clients that could conceivably connect to a NetService on an Apple TV)? Thanks in advance for any pointers! Jeff Kelley slauncha...@gmail.com | @SlaunchaMan <https://twitter.com/SlaunchaMan> | jeffkelley.org ___

Re: More elegance than a long if/else

2017-03-10 Thread Jeff Kelley
I realized after sending that 100 won’t be correct, so you’ll need something like this: batteryIcon.image = UIImage(named: "\(min(10, (_myBatteryLevel % 10) + 1))") Jeff Kelley slauncha...@gmail.com | @SlaunchaMan <https://twitter.com/SlaunchaMan> | jeffkelley.org On Fri, Ma

Re: More elegance than a long if/else

2017-03-10 Thread Jeff Kelley
Something like this should work: batteryIcon.image = UIImage(named: "\((_myBatteryLevel % 10) + 1)") Jeff Kelley slauncha...@gmail.com | @SlaunchaMan <https://twitter.com/SlaunchaMan> | jeffkelley.org On Fri, Mar 10, 2017 at 10:41 AM, Eric E. Dolecki <edole...@gmail.co

Re: WatchOS3 layering?

2017-01-27 Thread Jeff Kelley
Hi Eric, This sounds achievable. You can embed interface objects inside of a WKInterfaceGroup, and that group can have a background image. So you’d put the group in with your background image, and then inside of it would be the semicircle image. Does that sound like it would work? Jeff Kelley

Re: Make WatchKit app show local notification

2016-11-11 Thread Jeff Kelley
The recommended approach here (I think) is to show the notification on whichever device the user is using. Are you implementing any of the UserNotification framework pieces on the phone? Would it work for your purposes if the alert sometimes appeared there? Jeff Kelley slauncha...@gmail.com

Re: Make WatchKit app show local notification

2016-11-10 Thread Jeff Kelley
ensure those conditions, is it better? Jeff Kelley slauncha...@gmail.com | @SlaunchaMan <https://twitter.com/SlaunchaMan> | jeffkelley.org <http://jeffkelley.org/> > On Nov 10, 2016, at 8:50 PM, Charles Jenkins <cejw...@gmail.com> wrote: > > I’m trying to write a

Re: Vertical orientation of UISlider

2016-07-20 Thread Jeff Kelley
Reminds me of the old days before UICollectionView, where you could have table view cells scroll horizontally by embedding a rotated table view in each cell, then rotating the child table view’s cells in the opposite direction. Jeff Kelley slauncha...@gmail.com | @SlaunchaMan <ht

Re: Vertical orientation of UISlider

2016-07-20 Thread Jeff Kelley
Hi Carl, Have you tried applying a transform to the slider? A simple rotation should do the trick. Jeff Kelley slauncha...@gmail.com | @SlaunchaMan <https://twitter.com/SlaunchaMan> | jeffkelley.org <http://jeffkelley.org/> > On Jul 20, 2016, at 11:48 AM, Car

Re: Air Drop-style sharing between instances of my app?

2016-04-20 Thread Jeff Kelley
That sounds like the perfect use case for using the MultipeerConnectivity framework. At a lower level, you could use Bonjour (though that requires the devices to be on the same network). Jeff Kelley > On Apr 20, 2016, at 9:33 PM, Rick Mann <rm...@latencyzero.com> wrote: > >

Re: calendar & repeating events api

2016-02-16 Thread Jeff Kelley
I would start by looking at EKRecurrenceRule <https://developer.apple.com/library/ios/documentation/EventKit/Reference/EKRecurrenceRuleClassRef/index.html>. Jeff Kelley slauncha...@gmail.com | @SlaunchaMan <https://twitter.com/SlaunchaMan> | jeffkelley.org <http://jeffkelley.o

Re: Subclassing/Override question

2016-01-04 Thread Jeff Kelley
Hi Dave, For myClassA, you will always have to cast the return value to myClassB if you know that’s what will be returned. For a great blog post on the subject, I give you Mike Ash: https://mikeash.com/pyblog/friday-qa-2015-11-20-covariance-and-contravariance.html Jeff Kelley

Re: Common Date between Swift and ObjC

2014-08-12 Thread Jeff Kelley
; Then, in your bridging header, you’d import Constants.h. Jeff Kelley slauncha...@gmail.com | @SlaunchaMan https://twitter.com/SlaunchaMan | jeffkelley.org On Tue, Aug 12, 2014 at 1:47 PM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: In ObjC I used to do: CommonDefines.h #define PARAMETER_A

Re: iOS screen physical size (or px density)

2013-11-26 Thread Jeff Kelley
holding it further from their face. If you find that your iPad UI is too small on the iPad mini, then it was likely too small to begin with on the iPad. Jeff Kelley slauncha...@gmail.com | @SlaunchaMan https://twitter.com/SlaunchaMan | jeffkelley.org On Tue, Nov 26, 2013 at 12:00 PM, Maxthon Chan

Re: NSMethodSignature throws an exception encoding GLKMatrix4

2013-09-06 Thread Jeff Kelley
for that selector: [[self class] instanceMethodSignatureForSelector:@selector (identityReturningMethod)]; This will crash with the exception in my previous post. Am I correct that this is a bug in +[NSMethodSignature signatureWithObjCTypes:]? Jeff Kelley On Wed, Aug 21, 2013 at 12:51 PM, Marcel Weiher

Re: Threadsafe copy of objective c object

2013-09-03 Thread Jeff Kelley
, ^{ _count = count; }); } Hope this helps! (Note: all code was typed in the e-mail, so may not compile.) Jeff Kelley On Tue, Sep 3, 2013 at 9:34 AM, Jonathan Taylor jonathan.tay...@glasgow.ac.uk wrote: Ah. In my original email I didn't explain *why* it is that ideally I would like to make

Re: Threadsafe copy of objective c object

2013-09-03 Thread Jeff Kelley
Ken is, of course, correct. This is what I get for writing it in my mail client. You’ll want to use dispatch_sync() for reads and dispatch_barrier_async() for writes. Jeff Kelley On Tue, Sep 3, 2013 at 2:30 PM, Ken Thomases k...@codeweavers.com wrote: On Sep 3, 2013, at 9:26 AM, Jeff Kelley

Re: frame puzzle

2013-08-22 Thread Jeff Kelley
If any of appDelegate, appDelegate.buttonController, or appDelegate.buttonController.rotationControl return nil, then the value of appDelegate.buttonController.rotationControl.frame will be a zeroed-out struct. Jeff Kelley On Thu, Aug 22, 2013 at 4:05 PM, David Rowland rowla

NSMethodSignature throws an exception encoding GLKMatrix4

2013-08-21 Thread Jeff Kelley
. Jeff Kelley ___ 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

Re: APN and various apps determining each other present on a device?

2012-10-03 Thread Jeff Kelley
It’s relatively simple: App A registers for a URL scheme, let’s say AppA://. App B asks the system if it knows how to handle AppA:// links. Jeff Kelley On Oct 3, 2012, at 10:36 PM, William Squires wsqui...@satx.rr.com wrote: Let's say a company, IMakeGamesCo, has several games in the App

Re: False positive on writeToURL:atomically:encoding:error: ?

2012-06-23 Thread Jeff Kelley
: https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Strings/Articles/readingFiles.html#//apple_ref/doc/uid/TP40003459-SW5 Jeff Kelley On Jun 23, 2012, at 1:50 PM, Martin Hewitson wrote: Dear list, I have an interesting bug report from a user of an app of mine. The app manages

Re: How to throttle rate of NSInputStream?

2012-03-26 Thread Jeff Kelley
It's always felt like a hack to me, but this will run the run loop for a short time and return: [[NSRunLoop currentRunLoop] runUntilDate:[NSDate date]]; Though in your case, if the first thing it does is process your input stream, that doesn't help. Jeff Kelley On Mar 26, 2012, at 7:13 PM

Re: ARC and blocks

2012-01-26 Thread Jeff Kelley
MyViewController *myController = … It looks awful, yes, but without the first piece we were having extreme memory leaks. Jeff Kelley On Jan 26, 2012, at 5:34 PM, David Duncan wrote: On Jan 26, 2012, at 1:51 PM, Jan E. Schotsman wrote: Hello, This code is given in the Transitioning to ARC Release

Re: ARC and blocks

2012-01-26 Thread Jeff Kelley
On Jan 26, 2012, at 10:45 PM, Roland King wrote: On Jan 27, 2012, at 10:04 AM, Marco Tabini wrote: On 2012-01-26, at 6:09 PM, Jeff Kelley wrote: Without ARC, you would use __block to prevent the block from retaining the object and causing the retain cycle. With ARC, however, the object

Re: capturing self is likely to lead to a retain cycle ..

2011-11-12 Thread Jeff Kelley
the approach of a weak reference to self. Jeff Kelley On Sat, Nov 12, 2011 at 3:14 AM, Roland King r...@rols.org wrote: I have a UIViewController which is presented modally, it has a textfield which allows editing and a model object, call it foo, on which it can attempt to set the 'topicName

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-09 Thread Jeff Kelley
On Wed, Nov 9, 2011 at 3:08 AM, Don Quixote de la Mancha quix...@dulcineatech.com wrote: While the iOS and Mac OS X do have a better security track record than Windows does, I'm quite certain that's because The Scene has been focussing on Windows due to its greater numbers. With Apple's

Re: C struct and __unsafe_unretained

2011-10-30 Thread Jeff Kelley
application as long as you’re only using constant strings (which won’t be released). Jeff Kelley On Oct 30, 2011, at 1:32 PM, James Merkel wrote: The document on ARC talks about problematic C structs like: struct x { NSString *S; int X; } StaticArray[] = { @foo, 42, @bar, 97, ... }; I

Re: Can I jsut use @2x images without supplying a @1x image?

2011-10-21 Thread Jeff Kelley
to be unloaded from memory earlier, causing your users’ experience to suffer. So to be a good iOS citizen, you ought to include the 1x versions as well. Jeff Kelley On Oct 21, 2011, at 3:42 PM, David Hoerl wrote: I noticed by accident that everything seems to work just fine if I supply a im...@2x.png

Core Data Concurrency Issues

2011-08-04 Thread Jeff Kelley
queue. So, what is the proper way to create these objects on the main queue and then update them in the background? Thanks in advance. Jeff Kelley ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

ARC and Singletons

2011-08-01 Thread Jeff Kelley
Is there a new recommended way to implement a singleton with ARC? I remember hearing something about it, but I’m not sure what it was. Jeff Kelley ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Re: ARC and Singletons

2011-08-01 Thread Jeff Kelley
(that is, the ARC code will release the current array)? Jeff Kelley On Mon, Aug 1, 2011 at 12:05 PM, Dave Zarzycki zarzy...@apple.com wrote: The simplest and most ARC friendly way to implement the singleton pattern is to switch from instance methods to class methods – because the class itself

Re: ARC and Singletons

2011-08-01 Thread Jeff Kelley
were retaining something large, such as graphics, in the singleton, I guess I’d have to respond to memory warnings appropriately and kill resources at that time. Thanks for the feedback, guys. Jeff Kelley On Aug 1, 2011, at 1:52 PM, David Duncan wrote: On Aug 1, 2011, at 10:12 AM, Kyle Sluder

Re: Question about NSThread

2011-07-14 Thread Jeff Kelley
queue). Jeff Kelley On Thu, Jul 14, 2011 at 10:08 AM, Eric E. Dolecki edole...@gmail.comwrote: I haven't done much research, but if I have a method that does a lot of looping, can I just safely bust this off (fire and forget)? [NSThread detachNewThreadSelector:@selector(generateBigData

Re: iOS: String Drawing

2011-07-12 Thread Jeff Kelley
of customization to be had. Jeff Kelley On Tue, Jul 12, 2011 at 6:22 AM, Graham Cox graham@bigpond.com wrote: AFAIK, you don't have to subclass UILabel - it has a shadowColor/offset property that you can set as you wish, and it should all just work. Sure, the default values are sometimes a bit

Custom Colors as UITableViewCell background colors

2011-07-08 Thread Jeff Kelley
a custom background color/image for a cell and keep its rounded corners in grouped style table views? Jeff Kelley ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Re: Windows cryptography

2011-07-01 Thread Jeff Kelley
I would have a look at what's available through Cygwin. With any luck something like OpenSSL is available and has the features you're looking for. Jeff Kelley On Friday, July 1, 2011, Daniel Wambold wambo...@gmail.com wrote: Hello. I have an iPhone app (SDK 4.3) that uses symmetric key

Re: From a view rect to a screen rect

2011-07-01 Thread Jeff Kelley
for). Jeff Kelley On Fri, Jul 1, 2011 at 2:43 PM, Development developm...@fornextsoft.comwrote: I am sure I am missing something simple but I've tried everything I can find I need to convert a rectangle in a NSView to a corresponding rectangle in screen coordinates. originally I was using

Re: So... we can't use UIWebView (with a delegate) on a page that's pushed onto a UINavigationController stack?

2011-06-20 Thread Jeff Kelley
If you’re creating the web view in -viewDidLoad, you should probably release it and nil the pointer to it in -viewDidUnload, not -dealloc. Jeff Kelley On Sat, Jun 18, 2011 at 12:19 PM, Matt Neuburg m...@tidbits.com wrote: Important: Before releasing an instance of UIWebView for which you

Re: How to intercepting click on send in Mail.app

2011-06-01 Thread Jeff Kelley
Are you just trying to prevent the user from sending mail? There are much better alternatives, up to and including removing Mail.app from the /Applications folder. Jeff Kelley On Mon, May 30, 2011 at 10:51 AM, Nava Carmon ncar...@mac.com wrote: Actually the client is supposed to get a text

Re: Use them from only one thread at a time

2011-05-19 Thread Jeff Kelley
While that’s true for some classes (NSManagedObjectContext springs to mind) I think a more general way to say it would be “In most cases, although you can allocate instances of these classes on any thread, refrain from messaging an instance from more than one thread simultaneously.” Jeff Kelley

Re: Cocoa witch's broom

2011-04-14 Thread Jeff Kelley
Agreed. You wouldn’t go to the hardware store and try to build something using every product they carried. As for the English, Wikipedia has an article for “Witch’s Broom” in English, so I would go with the first (“Cocoa Witch’s Broom”). Not that I would build the app. Jeff Kelley On Thu, Apr

Re: iPhone animation puzzle

2011-03-20 Thread Jeff Kelley
to block the main thread. While it is acting I cannot use any of the controls on the screen. The first method lets me do what I wish as it proceeds. Anyone have advice? thanks, David Jeff Kelley SlaunchaMan@gmail.com___ Cocoa-dev mailing

Multiple declarations of objc_msgSend_stret

2011-02-03 Thread Jeff Kelley
objc-runtime.h header */ OBJC_EXPORT void objc_msgSend_stret(void * stretAddr, id self, SEL op, ...); #endif So, if the declaration is actually the first (I’m compiling for iOS 4.2, so I’m pretty sure __OBJC2__ is defined), how do you use it and get the return value of the function? Jeff Kelley

Re: Multiple declarations of objc_msgSend_stret

2011-02-03 Thread Jeff Kelley
On Feb 3, 2011, at 9:38 PM, Greg Parker wrote: On Feb 3, 2011, at 6:18 PM, Jeff Kelley wrote: I’m trying to use objc_msgSend_stret to call -bounds on a UIScreen. I have the following code: SEL bounds = NSSelectorFromString(@bounds); CGRect screenBounds; objc_msgSend_stret((void

Waiting for UIWebView with Dispatch Semaphores

2010-12-21 Thread Jeff Kelley
will ever be called while I’m blocking. Is there a way to synchronously wait for the web view? All combinations of splitting things off on separate threads fall apart when I try to wait for the image to be created. Thanks in advance for any suggestions. Jeff Kelley

Re: Waiting for UIWebView with Dispatch Semaphores

2010-12-21 Thread Jeff Kelley
a waste of time, but a dead end that will fail for anything but the simplest of scenes. The alternative, then, would be to find a way to render a PPT on a background thread, which UIWebView doesn’t seem suited for. Thanks for your comments. Jeff Kelley

Re: [iPhone] Changing iPhone Application Language Programatically.

2010-10-08 Thread Jeff Kelley
in your app. -Jeff Kelley On Monday, October 4, 2010, Tharindu Madushanka tharindu...@gmail.com wrote: Hi, I would like to know whether its possible to change to a language other than provided list of languages in iPhone Settings. By default using localized .lproj folders .strings files we could

Re: autorelease: how does this work!? (if at all)

2010-06-18 Thread Jeff Kelley
Blocks do retain objects that are passed in, so that's probably what's happening. Also, keep in mind that autoreleased objects aren't freed immediately; it happens when the run loop completes. You should always act as if it does happen immediately, but it isn't always true. Jeff Kelley On Jun

Re: send computer to sleep

2010-05-26 Thread Jeff Kelley
If you need to make the computer sleep immediately, you can use the command /usr/bin/pmset sleepnow. Jeff Kelley slaun...@umich.edu On May 26, 2010, at 5:01 PM, Julian. wrote: what is the correct way to send the computer to sleep? i couldn't find anything in the documentation, except

Re: NSKeyedArchiver: confusion

2010-05-18 Thread Jeff Kelley
on the file. What happens if you create a keyed unarchiver immediately after the code you sent us and unarchive the object in question? Jeff Kelley University of Michigan On May 18, 2010, at 5:21 PM, Matthew Weinstein wrote: My mistake for not being clear: I have an NSData in an object; I read

Re: Authenticate NSFileManager Operations

2010-05-05 Thread Jeff Kelley
Be sure NOT to redistribute the Adobe AIR framework unless you have prior written permission from Adobe. Jeff Kelley slaun...@umich.edu Campus Computing Sites Information and Technology Services University of Michigan On May 5, 2010, at 11:57 AM, k...@highrolls.net wrote: I was using