UIActivityViewController > Mail: some elements picking up custom window tint color

2015-09-26 Thread Steve Christensen
My app sets a custom tint color on the main window as part of its initialization. Later it creates a UIActivityViewController instance and explicitly set its controller.view's tint color to the blue system tint color before having the root view controller present it. I added this last piece in

auto-layout and rotated UILabels

2016-02-04 Thread Steve Christensen
Our UI design calls for a UILabel rotated 90° CCW. When I originally started implementing several months ago, I tried going the auto-layout route but ran out of time without a solution, so I went back to manual layout, calculating the size of the label in code then adjusting the frames of the la

Re: auto-layout and rotated UILabels

2016-02-06 Thread Steve Christensen
On Feb 4, 2016, at 2:59 PM, Quincey Morris wrote: > > On Feb 4, 2016, at 13:01 , Steve Christensen <mailto:puns...@mac.com>> wrote: >> >> it looks like the width of the embedding view is set to the text width of >> the UILabel instead of the text heigh

Re: debugging AirDrop (update)

2016-05-27 Thread Steve Christensen
I haven't worked with AirDrop, but I just looked at the docs and one of the delegate methods is -sharingService:didFailToShareItems:error:. Maybe if you implement that you can at least see what the specific error is? Steve > On May 26, 2016, at 10:23 PM, Gerriet M. Denkmann > wrote: > > I h

Re: unicode fraction symbol in a NSTextView

2016-06-22 Thread Steve Christensen
Where are you specifying the text encoding of the HTML "document" passed to NSMutableAttributedString(HTML:, documentAttributes:)? The default encoding for HTML used to be ISO-8859-1, not UTF-8, for HTML 4 and earlier (and could continue to be interpreted that way by NSAttributedString for compa

Re: specifying UIInterfaceOrientationMask

2016-07-12 Thread Steve Christensen
So, (UIInterfaceOrientationMask.Portrait | UIInterfaceOrientationMask.LandscapeLeft) doesn't work? > On Jul 12, 2016, at 11:25 AM, William Squires wrote: > > In iOS 8, I would (in a view controller): > > ... > override func supportedInterfaceOrientations() -> Int > { > return Int(UIInterfaceO

Re: Core Graphics: Is it better to up-sample or down-sample images when drawing into a rect?

2016-08-25 Thread Steve Christensen
> On Aug 24, 2016, at 8:37 PM, Jeff Szuhay wrote: > > >> On Aug 24, 2016, at 8:02 PM, Britt Durbrow >> wrote: >> >> >>> On Aug 24, 2016, at 12:59 PM, Jeff Szuhay wrote: >>> >>> I draw my images (clocks) into a “reference” sized rectangle—for simplified >>> position calculations—and then h

Re: SecStaticCodeCheckValidity fails when app is lauched from Terminal

2016-09-26 Thread Steve Christensen
What is the error code when it fails? > On Sep 26, 2016, at 2:44 AM, Markus Spoettl wrote: > > I'm using SecStaticCodeCheckValidity() to self check the signature of my own > app when it is launched. This works fine and always has. > > All of a sudden, the call to SecStaticCodeCheckValidity()

Re: iOS: Preventing a singleton from being deallocated when the app is in the background.

2016-10-19 Thread Steve Christensen
This is the model I use for singletons and I've never had the singleton instance deallocated out from under me. + (MyClass*) sharedThing { static dispatch_once_t sOnceToken = 0; static MyClass* sSharedThing = nil; dispatch_once(&sOnceToken, ^{ sSha

Re: iOS: Preventing a singleton from being deallocated when the app is in the background.

2016-10-19 Thread Steve Christensen
lex Zavatone wrote: > > On Oct 19, 2016, at 2:08 PM, Steve Christensen wrote: > >> This is the model I use for singletons and I've never had the singleton >> instance deallocated out from under me. >> >> + (MyClass*) sharedThing >> { >> sta

Re: Animating autolayout constraint changes for subviews

2016-12-28 Thread Steve Christensen
I have always put the thing that I'm animating into the animation block: - (IBAction)animateIt:(id)sender { static BOOL small = NO; small = !small; CGFloat newWidth = small ? self.view.frame.size.width / 2 : self.view.frame.size.width; [UIView animateWithDuratio

Re: Animating autolayout constraint changes for subviews

2016-12-28 Thread Steve Christensen
action?path=/videos/wwdc_2012__sd/session_228__best_practices_for_mastering_auto_layout.mov> > > But in general, the SDK documentation on animating autolayout constraint > changes is borderline non-existent. > > Doug Hill > > >> On Dec 28, 2016, at 5:54 PM, Steve Christensen > <mailto:puns...@mac.com>> wrot

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 ti

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 se

UICollectionView cells sometimes drawn on top of section header

2017-01-06 Thread Steve Christensen
iOS 10. I'm seeing some odd behavior where occasionally collection view cells are drawn on top of their section header view instead of behind it. When I use the view inspector in Xcode then I do, in fact, see the cells in front of the section header. These are pretty generic cells that contain

What generates NSURLErrorUnsupportedURL?

2017-02-08 Thread Steve Christensen
I am occasionally seeing a NSURLErrorUnsupportedURL (unsupported URL) error being returned by download tasks on a background NSURLSession, on iOS. Before you ask, the URL (https://…) is properly formed, [NSURL URLWithString:] returns a non-nil URL, and as an extra manual check I did an online va

Re: What generates NSURLErrorUnsupportedURL?

2017-02-08 Thread Steve Christensen
Jens Alfke wrote: >> >>> On Feb 8, 2017, at 10:38 AM, Steve Christensen wrote: >>> >>> The time between when the request is made and when it completes with an >>> error might be a minute or so, so the framework is immediately bailing on >>> the

How to set UILabel height to even multiple of line height with auto-layout?

2014-09-09 Thread Steve Christensen
I have a UITableViewCell with several stacked UILabels: - label1: set to 1 line, height = single line height, fixed bottom spacing - label2: set to 2 lines, height ≥ single line height, fixed bottom spacing - label3: set to 0 lines, height ≥ single line height, bottom spacing ≥ min spacing The l

Re: How to set UILabel height to even multiple of line height with auto-layout?

2014-09-10 Thread Steve Christensen
y to 1 and its > lineBrakeMode property to NSLineBreakByTruncatingTail is all it takes to get > text to truncate. You can do it in code, or in IB if you’re laying out your > tableViewCell in a storyboard or XIB. > > On Sep 9, 2014, at 12:48 PM, Steve Christensen wrote: &g

Deferred purchase testing in the App Store sandbox?

2014-09-29 Thread Steve Christensen
I'm trying to figure out how to test deferred purchases (SKPaymentTransactionStateDeferred) in the sandbox but thus far have not been able to find any guidance. In chatting with The Google I see questions in Apple's developer forums, stack overflow.com, etc., but no answers. Has anybody had suc

Re: Deferred purchase testing in the App Store sandbox?

2014-09-30 Thread Steve Christensen
least proves that my UI behaves the right way in the event of > SKPaymentTransactionStateDeferred. It's a hack but helped me feel > somewhat better that the code worked. > > Dave > > On Mon, Sep 29, 2014 at 12:03 PM, Steve Christensen wrote: >> I'm trying to figur

Re: wits end with nsview and nsrectfill()

2014-11-30 Thread Steve Christensen
Why aren't you creating the subview in -initWithFrame: or in a nib/storyboard? The purpose of -drawRect: is solely to [re-]draw the contents of one view, not build a view hierarchy. I expect that modifying the view hierarchy while in the middle of a drawing cycle is leaving views in an inconsist

Re: Conditional Compilation for 10.9/10.10...

2015-01-02 Thread Steve Christensen
> #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_9 This is a compile-time conditional so it will be true as long as you are building with a pre-10.10 deployment target, thus -constrainScrollPoint: will never be compiled in. You should put the #if … #endif around -constrainBoundsRect:

NSURLSession delegate not being called in iOS Simulator

2015-01-07 Thread Steve Christensen
An app I'm working on connects to our server with SSL. The production server has an SSL certificate but the development server does not. When testing new server code on the development server I initialize the NSURLSession with [NSURLSession sessionWithConfiguration:delegate:delegateQueue:], pass

Re: drawRect runs twice, bounds are changed in between

2015-01-15 Thread Steve Christensen
Would the Managing Live Resize methods of NSView (https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSView_Class/#//apple_ref/doc/uid/2014-SW41) be helpful? The docs for -viewWillStartLiveResize suggest that that would be a good place to prepare fo

Re: Tracking the retain count

2015-05-19 Thread Steve Christensen
I just finished catching up on the discussion and keep coming back to the fragile nature of relying on retainCount. For now you do, indeed, have the option to vaporize your toes; later you may not have access to a ray gun if Apple decides that it's in the best interests of all concerned that the

Re: Tracking the retain count

2015-05-19 Thread Steve Christensen
On May 19, 2015, at 8:52 AM, Britt Durbrow wrote: > >> On May 19, 2015, at 7:20 AM, Steve Christensen wrote: >> >> I just finished catching up on the discussion and keep coming back to the >> fragile nature of relying on retainCount. For now you do, indeed, have

Re: Looking at self = [super init].

2015-05-31 Thread Steve Christensen
No, it doesn't make a difference. In both cases the compiler will generate a "test and branch" to the method's epilogue. For the "=" case: if (self = [super init]) ... is equivalent to: if ((self = [super init]) != nil) ... is equivalent to: self = [super init];

Re: Using CFSTR() with const char * variable

2015-06-06 Thread Steve Christensen
In my prefix file that is used to build precompiled headers, I include the following after #import-ing all the framework headers. It replaces the standard definition with a version that doesn't insert quotes around an unquoted string literal. #undef CFSTR//(cStr) #ifdef __CONSTANT_CFSTRINGS__ #

Re: iOS version check

2015-06-12 Thread Steve Christensen
How about something like this? NSInteger majorSystemVersion = UIDevice.mainDevice.systemVersion.integerValue; if (majorSystemValue == 8) AVSpeechUtterance.rate = else AVSpeechUtterance.rate = > On Jun 11, 2015, at 10:23 PM, Quincey Morris > wrote: > > There’s a particular A

Re: iOS version check

2015-06-12 Thread Steve Christensen
ice method may be a better way to go. > On Jun 12, 2015, at 10:04 AM, Quincey Morris > wrote: > > On Jun 12, 2015, at 06:22 , Steve Christensen wrote: >> >> NSInteger majorSystemVersion = >> UIDevice.mainDevice.systemVersion.integerValue; > > >

debugging UIWebView and errors

2015-07-30 Thread Steve Christensen
Does anybody know if there's a way to get WebKit to dump errors to the console? The default behavior appears to be to fail silently. Background: I'm working on an app that deploys to iOS 7 and later. It contains a UIWebView whose content is build dynamically and contains, among other things, a

Re: Help understanding Apple's approach in documentation a little better.

2015-08-17 Thread Steve Christensen
On Aug 16, 2015, at 2:58 PM, Alex Zavatone wrote: > Would be REALLY nice if there was something visual that simply communicated > to you that they are not for public consumption. > > If I see it in the left pane of the debugger, and no visual indicators are > stating that it's restricted, It's

Re: drawing my image in snow leopard

2009-09-02 Thread Steve Christensen
Does this not do what you want? [myImage drawInRect:NSIntegralRect(myCenteredRect) fromRect:...]; steve On Sep 2, 2009, at 9:22 AM, Rick C. wrote: thank you markus i do see that now. since my icon centers the numbers will always change. this should be obvious but what would be the least

Re: Macros

2009-09-02 Thread Steve Christensen
Wouldn't this be better asked on the xcode-users mailing list (assuming you're talking about Xcode debug/release builds)? It doesn't have anything to do with Cocoa. On Sep 2, 2009, at 8:54 AM, Development wrote: Ok I cannot find an example of how to do this online so I'nm asking here. I w

Re: Image Thresholding

2009-09-03 Thread Steve Christensen
On Sep 2, 2009, at 10:29 PM, fawad shafi wrote: I want to convert grayscale or RGB image to Binary Image. Please provide sample code. Requests to "please provide sample code" sounds like you want other people to do your work for you. There is plenty of information on how to do that if you

Re: sprintf and 64-bit integers

2009-09-13 Thread Steve Christensen
On Sep 13, 2009, at 11:10 AM, slasktrattena...@gmail.com wrote: On Sun, Sep 13, 2009 at 8:01 PM, Bill Bumgarner wrote: On Sep 13, 2009, at 10:59 AM, slasktrattena...@gmail.com wrote: I'm updating my code for Snow Leopard and ran into this problem. The app crashes at this line: sprintf(str,

Re: Finding user's Music folder (and others)?

2009-09-17 Thread Steve Christensen
On Sep 17, 2009, at 8:18 PM, Rick Mann wrote: On Sep 17, 2009, at 20:15:43, Michael Babin wrote: On Sep 17, 2009, at 10:03 PM, Rick Mann wrote: Hmm. I take it back. I can't get code calling NSSearchPathForDirectoriesInDomains() to compile. NSArray* paths = NSSearchPathForDirectoriesInDo

Re: Problem with fontDescriptorWithFontAttributes:

2009-09-21 Thread Steve Christensen
On Sep 21, 2009, at 2:29 PM, Laurent Daudelin wrote: On Sep 21, 2009, at 14:23, Kyle Sluder wrote: Fonts really don't have colors. I don't know why NSFontColorAttribute is defined in NSFontDescriptor.h, but none of the other attributed string attributes are in there. Why are you trying to

Re: How to create a control just as RGB Sphere and Alpha bar

2009-09-25 Thread Steve Christensen
Is there some reason why you can't use the color picker to specify a color+alpha value? It would save you a bunch of work in duplicating existing system functionality. On Sep 24, 2009, at 11:20 PM, Symadept wrote: Hi Graham, Yes. But do you have any other ways to handle this. I want somet

Re: [iPhone] Application running for the very first time...

2009-10-07 Thread Steve Christensen
On Oct 1, 2009, at 10:57 PM, James Lin wrote: Thank you for the code snipet, but I am confused at the logic here... the following code will be executed EVERY time the program runs, right? NSMutableDictionary *dictionary = [[NSMutableDictionary alloc] initWithCapacity:10]; [dictionary se

Re: [iPhone] Application running for the very first time...

2009-10-07 Thread Steve Christensen
On Oct 7, 2009, at 10:47 AM, Marco S Hyman wrote: On Oct 7, 2009, at 10:33 AM, Steve Christensen wrote: In that case if ([[NSUserDefaults standardUserDefaults] boolForKey:@"PIFirstRun"] == YES){ [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@&

Re: Are these Apple or 3rd party classes?

2009-10-09 Thread Steve Christensen
A quick Google search came up with a reference to EPIJDataManager that somehow relates to Epson printers. I couldn't find any other info than that. On Oct 9, 2009, at 6:48 AM, Philip White wrote: A customer of one of my shareware programs has reported that my program frequently crashes wh

Re: Opening a NSSavePanel as a Sheet, and blocking like in [panel runModal]

2009-10-15 Thread Steve Christensen
I had written this NSOpenPanel category to work in a plugin environment, and I think it should do the right thing. Just set up the NSOpenPanel as you like then call - runModalForDirectory:file:types:relativeToWindow: and it will return when the user has selected (or not) a file. steve //

Re: Opening a NSSavePanel as a Sheet, and blocking like in [panel runModal]

2009-10-21 Thread Steve Christensen
w return the active and frontmost document window, respectively, skipping over other types of windows that may be in front of the active document, such as the menubar window, floating windows, help tags and toolbars." On 15/10/2009, at 21:40, Steve Christensen wrote: I had written this

Re: Opening a NSSavePanel as a Sheet, and blocking like in [panel runModal]

2009-10-22 Thread Steve Christensen
I don't know what the difference would be in trying to attach to a native NSWindow vs one that wraps a Carbon window. When I've done this in the past, I always knew that I was attaching to a native NSWindow. Sorry I can't be more helpful. steve On Oct 22, 2009, at 6:44 AM, Motti Shneor wr

Re: How to imitiate mouse move programmatically? [NSApp postEvent:atStart:] does not work...

2009-11-03 Thread Steve Christensen
Oleg, had you thought of doing something like adding -isSelectionValid and -setSelectionValid: methods to your controller class? The view would always keep track of the mouse state, tell the controller what the current selection is when the mouse moves, but won't update itself or respond to

Re: Bulletproof way to create a new CGBitmapContext from an existing image?

2009-11-03 Thread Steve Christensen
Why not alway create a CGBitmapContext of the desired size and in a supported pixel format (see ), then call CGContextDrawImage to draw the CGImage into the context? Then you're always controlling the parameters. CGRect bounds =

Re: How can a plug-in bundle get access to its own resources?

2009-11-15 Thread Steve Christensen
As has been pointed out several times, it's a really bad idea to have the same-named class in multiple plugins. The Objective-C runtime will load the first class instance it finds (in your case, in the first- loaded plugin). For all other plugins, when the class is referenced, that first cla

Re: How can a plug-in bundle get access to its own resources?

2009-11-16 Thread Steve Christensen
amework/Versions/Current (alias) Structures everywhere --- Do they work right? I mean can a host application (or host library) load a plug-in by a specific version, and KNOW FOR SURE that the right library was loaded? Any references to how-to implement multi-version code bundles? On 16/1

-[QCNSBitmapImageRep encodeWithCoder:]: Inconsistent state

2010-03-13 Thread Steve Christensen
I am running into a weird error and I don't know why it's happening. I am adding an image that comes from a Quartz Composer composition to a dictionary. The dictionary is archived, and when that happens I see the following message in the console: -[QCNSBitmapImageRep encodeWithCoder

Re: NSTimer never being deallocated

2010-03-14 Thread Steve Christensen
On Mar 13, 2010, at 10:57 AM, Tobias Jordan wrote: What made me think it is a bug was actually only the fact that instruments told me the object is always still alive and the 'missing' note in the documentations that tell me I don't need to release it because of some caching techniques. W

Re: Determining an inter-application drag source

2010-03-25 Thread Steve Christensen
I'm curious why you need to know where the drag originated since it generally shouldn't matter. Do you have to do some extra work in one case? And what happens if you see a drag from another application? On Mar 25, 2010, at 7:55 AM, Jeffrey J. Early wrote: Is there any way to determine the

Re: Determining an inter-application drag source

2010-03-26 Thread Steve Christensen
r has some esoteric old types for backwards compatibility and I would guess that Aperture has some image types that the Finder wouldn't normally use (except maybe for picture clippings) But as Steve said, why should it matter? Matt Gough On 25 Mar 2010, at 23:22:54, Steve Chr

Re: Determining an inter-application drag source

2010-03-26 Thread Steve Christensen
actually still under the impression that there was a mechanism to determine the drag source that I didn't know about. As the consensus appears to be that there isn't, I will file a bug report. Jeffrey On Mar 26, 2010, at 10:28 AM, Steve Christensen wrote: I wouldn't say that there h

Re: How to get wifi information

2010-03-29 Thread Steve Christensen
If you're just playing around with an app that only you will be using, have fun exploring. However, if you're planning to release it through Apple's store, I've read that they will reject your app if it's using private API calls. On Mar 27, 2010, at 1:43 AM, Gavin(??) wrote: I would like

Re: Drawing a path and making an object follow that path IPHONE

2010-04-14 Thread Steve Christensen
You could probably start by studying the documentation for CGPathRef, which lets you create, manipulate and draw bezier paths. These are C, not Objective-C API calls, but they work perfectly fine in an Objective-C application. iPhone OS 3.2 adds UIBezierPath, with wraps these calls, but if

playing QuickTime movies on iPhone/iPad?

2010-04-21 Thread Steve Christensen
I have a need to be able to play a QuickTime movie containing subtitle tracks, and to be able to turn specific tracks on or off. In looking through the iPhone/iPad docs, it looks like the movie player classes are pretty much restricted to simple playback functions. Have I missed something?

Re: NSImage and NSImageView questions

2010-05-09 Thread Steve Christensen
On May 8, 2010, at 8:50 AM, Matthew Weinstein wrote: 1. I have an NSImageView which scales the image to fit, aligned centered. My question is, how do I find the NSRect of the image in the image view (as it does not fill the frame)? NSRect scaledImageBounds; scaledImageBounds.size.width =

Cannot change IKImageBrowserView group title text color?

2010-05-26 Thread Steve Christensen
I have a IKImageBrowserView using disclosure-style groups. I'm setting a dark background and have changed the item title attributes to use a light color so the titles are visible. That all works great. The problem is that I haven't been able to find a property key for changing the group tit

Re: Cannot change IKImageBrowserView group title text color?

2010-05-26 Thread Steve Christensen
ageBrowser setValue: yourLayerTree forKey: IKImageBrowserGroupHeaderLayer]; -- Thomas On May 26, 2010, at 7:00 PM, Steve Christensen wrote: I have a IKImageBrowserView using disclosure-style groups. I'm setting a dark background and have changed the item title attributes to use a lig

Re: Which color space?

2010-05-30 Thread Steve Christensen
Is either NSCalibratedWhiteColorSpace or NSDeviceWhiteColorSpace not working for you? Also, just a style note, but you don't need to cast every parameter passed to a function; the compiler typically figures that out. The only time you really need to do it is if there could be confusion of

Re: Which color space?

2010-06-01 Thread Steve Christensen
It's available in the documentation that comes with Xcode. If you go to NSColorSpace's class reference, there's an item in the TOC on the left named "Color Programming Topics for Cocoa." If you click on that link then on the "About Color Spaces" link, that will take you to a good overview.

Re: Reduce the size of an NSImage

2010-06-01 Thread Steve Christensen
On May 31, 2010, at 5:38 AM, Simon Raisin wrote: I am trying to reduce the size of an NSImage by 50% and then save the reduced image out to disk. The following code does not reduce the image. Should I be going about this a different way? NSImage* inputImage = [[NSImage alloc] initWithConte

Re: I need float resolution bitmap data from a JPG using CIImage or similar helper

2010-06-01 Thread Steve Christensen
It seems like you're jumping through a lot of hoops. If you picked up where David left off, you could do something like this. (Typed in Mail so YMMV.) CGImageSourceRef source = CGImageSourceCreateWithURL(urlToFile, (CFDictionaryRef)[NSDictionary dictionaryWithObject:[NSNumber numberWithBO

Re: Erasing drawn content

2010-06-08 Thread Steve Christensen
Perhaps call NSRectFillUsingOperation(rect, NSCompositeClear) before drawing each rectangle? On Jun 8, 2010, at 5:32 AM, Matej Bukovinski wrote: * PGP Bad Signature, Signed by an unverified key Hi, In a cocoa application that I'm developing I have a custom NSView subclass that I use as a

Re: Discard all drawing in a UIView

2010-07-22 Thread Steve Christensen
I think a more basic question is what you're doing in -drawRect that would generate an exception in the first place. Typically a view should already have access to any relevant resources (strings, images, whatever) before -drawRect is ever called. Assuming that the exception is a reasonable erro

Re: Strange NSFileManager file replacement issue

2011-08-19 Thread Steve Christensen
On Aug 19, 2011, at 7:17 AM, Sixten Otto wrote: > On Thu, Aug 18, 2011 at 10:38 PM, Ken Thomases wrote: > >> Those functions, and the general operation that they perform, require that >> the files to be exchanged be on the same file system. > > If true, that certainly makes that method far less

Re: Account validation in CocoaTouch for the purchased app

2011-12-21 Thread Steve Christensen
On Dec 20, 2011, at 2:26 PM, Alexander Reichstadt wrote: > given an app is sold on iTunes, is there a way for that app to find out which > email address was used for the iTunes account when it was purchased? I don't believe so. As far as I know, the only way to find that out is to ask the user.

Re: NSString looses Umlaute

2011-12-22 Thread Steve Christensen
And just to add in one more bit about why it's important to separate the text from the binary header, -initWithData:encoding: "[r]eturns nil if the initialization fails for some reason (for example if data does not represent valid data for encoding)." (That is from the NSString docs.) On Dec 2

Re: Storyboard SplitViewController example

2011-12-25 Thread Steve Christensen
On Dec 24, 2011, at 7:13 PM, Jamie Daniel wrote: > I am very new to Xcode and iPad development. I am trying to do the following: > > I have an initial NavigationController and ViewController. I am trying to go > from a button on the ViewController to a SplitViewController using > Storyboards bu

Re: UIWebView and Mobile Safari event handling problem (iOS)

2012-01-08 Thread Steve Christensen
It looks like UIWebView snarfs up all the gestures by default. I had a project where I needed to "see" a tap on the web view without otherwise disrupting the normal behavior. I ended up creating a UITapGestureRecognizer, set its delegate to "self", and then implemented -gestureRecognizer:should

Re: Is slowing down bindings updates possible?

2012-01-13 Thread Steve Christensen
Why don't you just decouple your UI from the "by-the-millisecond" download process? For example, you could update calculated values whenever the value of bytesDownloaded changes but use a NSTimer to update the display of those values maybe once or twice a second. The display is then sampling the

Re: What causes a UITableViewCell to be deallocated?

2012-01-23 Thread Steve Christensen
A UITableViewCell could be deallocated as soon as its row scrolls out of view. UITableView will reuse cells if you specify a reuse identifier, but I don't believe that the docs actually specify the number of cells that are reused. I'm assuming that the web view is displayed when the user taps a

Re: How to support larger NSView hierarchy?

2012-02-29 Thread Steve Christensen
On Feb 27, 2012, at 10:21 PM, Quincey Morris wrote: > On Feb 27, 2012, at 20:46 , Graham Cox wrote: > >> Jeez. > > Indeed. Especially as it's usually taken as a given that large numbers of > NSViews aren't going to perform well. Trying to make the scenario work might > be quixotic at best. >

Re: Memory used by a UIImage?

2011-03-04 Thread Steve Christensen
I doubt you could find out *exactly* how much memory is being used. You could probably get an approximation by multiplying pixelHeight * pixelWidth * 4 (assuming A, R, G, B channels), since the image bitmap is likely to be the biggest chunk for images of any real size. On Mar 4, 2011, at 2:18

Assertion failure in -[MPMoviePlayerControllerNew _moviePlayerDidBecomeActiveNotification:]

2011-03-08 Thread Steve Christensen
I'm seeing the above assertion in an app running on iOS 4.2.1. It then throws an NSInternalInconsistencyException with the reason: "movie player has wrong activation state (1)." The setup has a MPMoviePlayerController instance that is playing a local audio file. There is also a UIWebView whose

Re: Testing apps on Mac OS X 10.5

2011-03-10 Thread Steve Christensen
On Mar 10, 2011, at 7:43 AM, Benedikt Iltisberger wrote: > I would like to know how you all do your testing on older versions of Mac OS > X. Do you run additional systems with older versions of Mac OS X or do you use > virtual machines? I'd test on the OS versions we supported, usually the lates

Re: Assertion failure in -[MPMoviePlayerControllerNew _moviePlayerDidBecomeActiveNotification:]

2011-03-13 Thread Steve Christensen
On Mar 13, 2011, at 11:05 AM, Matt Neuburg wrote: > On Tue, 08 Mar 2011 17:01:33 -0800, Steve Christensen said: >> The setup has a MPMoviePlayerController instance that is playing a local >> audio file. There is also a UIWebView whose HTML contains an tag. >> When the p

Re: Simulate touch event with cordinate?

2011-04-02 Thread Steve Christensen
On Apr 1, 2011, at 10:25 PM, Rikza Azriyan wrote: > Yes, i want to make an application like ibooks that the user can navigate the > page by swipe the screen, than >> - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event; > Will respond for that swipe... > But in my case, i don't want

Re: UIView/NSView doesn't display changing data in real time

2011-04-19 Thread Steve Christensen
Is your call to -setNeedsDisplay being done on the main thread or from your background thread. I seem to recall that you get ignored if the call is not made on the main thread, so you'd need to use one of the -performSelectorOnMainThread:... methods. On Apr 19, 2011, at 10:51 AM, Frederick C.

Re: is it has lack of understanding & full of errors ??

2011-04-21 Thread Steve Christensen
Generally speaking, readers of this list are busy working on their own projects, so asking them to peruse and comment on an entire project is unreasonable. You are responsible for your own education and research. If you have specific questions and/or run into specific problems, you're more likel

Re: Properties vs Instance Variables

2011-04-26 Thread Steve Christensen
On Apr 26, 2011, at 8:28 PM, Guy Steven wrote: > I am currently learning objective c and cocoa > > I believe I understand the difference between properties and instance > variables, and the effect of using properties as opposed to instance > variables viz a viz KVO and memory management. A prope

Re: sort array of dictionaries by multiple critera

2011-04-27 Thread Steve Christensen
Either of these would allow you to do what you want for NSArray: - (NSArray *)sortedArrayUsingComparator:(NSComparator)cmptr; - (NSArray *)sortedArrayUsingFunction:(NSInteger (*)(id, id, void *))comparator context:(void *)context; And these for NSMutableArray: - (void)sortUsingComparator:(NSCom

Re: iOS Version Install Base

2011-04-28 Thread Steve Christensen
We're only supporting iOS 4.0 and later since we feel like there's sufficient adoption rate to make it worthwhile. Certainly if you feel like you still need to support pre-4.0, you could build against the current 4.x SDK, set the deployment target to be iOS 3.x (or whatever), and conditionally i

iOS nib weirdness...

2011-05-04 Thread Steve Christensen
I'm working on an app that uses a tab bar. I created a new nib to set up a view+controller and added a new tab item to the main nib that references the controller and the controller's nib, plus I filled in some basic functionality in the view controller. Since it's relevant, the controller's IBO

Re: L-shaped custom view in Cocoa?

2011-05-04 Thread Steve Christensen
All views are rectangular in shape. You can restrict drawing and responding to events to an L-shaped area, but the view itself will still be a rectangle. On May 4, 2011, at 6:41 AM, Vyacheslav Karamov wrote: > I need to make custom view in the form of letter L. How to do it? __

Re: iOS nib weirdness...

2011-05-04 Thread Steve Christensen
Yes, the table view is typed as MyTableView in the xib. On May 4, 2011, at 7:21 AM, Evadne Wu wrote: > Just a wild thought, but could you probably look into the (offending) XIB and > make sure that the table view is of a custom class? > > -ev > > On May 4, 2011, at 22:00,

Re: iOS nib weirdness...

2011-05-04 Thread Steve Christensen
ken. It does not keep the contract of > initWithNibName:bundle: > > atze > > > Am 04.05.2011 um 16:00 schrieb Steve Christensen: > >> I'm working on an app that uses a tab bar. I created a new nib to set up a >> view+controller and added

Re: iOS nib weirdness...

2011-05-04 Thread Steve Christensen
On May 4, 2011, at 8:02 AM, Fritz Anderson wrote: > On 4 May 2011, at 9:00 AM, Steve Christensen wrote: > >> IBOutlet MyTableView* _resultsTable; >> IBOutlet UIActivityIndicatorView* _searchActivityIndicator; >> IBOutlet UISearchBar* _searchBar; >> >> When I

Re: iOS nib weirdness...

2011-05-04 Thread Steve Christensen
On May 4, 2011, at 8:17 AM, glenn andreas wrote: > On May 4, 2011, at 9:00 AM, Steve Christensen wrote: > >> I'm working on an app that uses a tab bar. I created a new nib to set up a >> view+controller and added a new tab item to the main nib that references the

Re: L-shaped custom view in Cocoa?

2011-05-04 Thread Steve Christensen
to know how to restrict drawing and > responding to events to L-shaped area. > > 04-May-11 17:38, Steve Christensen пишет: >> All views are rectangular in shape. You can restrict drawing and responding >> to events to an L-shaped area, but the view itself will still be a r

Re: iOS nib weirdness...

2011-05-06 Thread Steve Christensen
ore. On May 4, 2011, at 7:00 AM, Steve Christensen wrote: > I'm working on an app that uses a tab bar. I created a new nib to set up a > view+controller and added a new tab item to the main nib that references the > controller and the controller's nib, plus I filled in some

Re: Drawing an arc fill inside an image

2011-05-26 Thread Steve Christensen
Custom view that sits on top of a UIImageView? Implement -drawRect: and a progress property and you're done. On May 26, 2011, at 11:21 AM, Alex Kac wrote: > I'm not sure what the best way to tackle this is... so I thought I'd ask > here. I have an image with a circular button inside of it. I'd

Re: Application Design

2011-05-27 Thread Steve Christensen
A view controller controls a specific view hierarchy so it shouldn't be reaching explicitly out to other view controllers to tell them to do something. Depending on your specific situation, interested objects could register for notifications when certain things change in the world, then one obje

Re: Application Design

2011-05-31 Thread Steve Christensen
How about providing a singleton class method? Then you just include WebServiceInterface.h where needed. No need to have a global variable. @implementation WebServiceInterface ... + (WebServiceInterface*) sharedInterface { static WebServiceInterface* sharedInstance = nil; if (sh

Re: Application Design

2011-06-01 Thread Steve Christensen
dInsance = nil; > } > > D > > > On 1 June 2011 09:54, Dan Hopwood wrote: > Great, thanks a lot Steve - very helpful. > > D > > > > On 31 May 2011 18:44, Steve Christensen wrote: > How about providing a singleton class method? Then you just

Re: Application Design

2011-06-01 Thread Steve Christensen
t; } >> >> D >> >> >> On 1 June 2011 09:54, Dan Hopwood wrote: >> >>> Great, thanks a lot Steve - very helpful. >>> >>> D >>> >>> >>> >>> On 31 May 2011 18:44, Steve Christensen wrote: >&g

Re: Scaling a NSImage not working

2011-06-01 Thread Steve Christensen
-drawInRect draws the image into the destination rectangle, stretching or shrinking as necessary to get it to fit. If you want to preserve the aspect ratio, you'll have to generate a scaled rectangle with the image's aspect ratio. That's just simple math. On Jun 1, 2011, at 9:29 PM, Develo

Re: Malformed URL string in openURL

2011-06-07 Thread Steve Christensen
On Jun 7, 2011, at 6:32 PM, James Merkel wrote: > On Jun 7, 2011, at 6:20 PM, Jens Alfke wrote: > >> On Jun 7, 2011, at 6:17 PM, James Merkel wrote: >> >>> The following works ok: >>> >>> NSString * mapquestURLString; >>> >>> mapquestURLString = [NSString >>> stringWithString:@"http://mapq.st

  1   2   3   4   >