Re: Auto-layout, Forcing a top-level view to hug its contents

2022-11-05 Thread Steve Christensen via Cocoa-dev
t;> On Nov 4, 2022, at 23:05, Steve Christensen via Cocoa-dev >> wrote: >> >> The view hierarchy doesn’t go through a layout pass until after it is added >> to a live view or window. At awakeFromNib time it’s still essentially a >> snapshot of the layout

Re: Auto-layout, Forcing a top-level view to hug its contents

2022-11-04 Thread Steve Christensen via Cocoa-dev
The view hierarchy doesn’t go through a layout pass until after it is added to a live view or window. At awakeFromNib time it’s still essentially a snapshot of the layout in the nib since it hasn’t yet been inserted into the “context” that will allow the layout engine to determine how big all

Re: Retrieving the EXIF date/time from 250k images

2022-08-16 Thread Steve Christensen via Cocoa-dev
You mentioned creating and managing threads on your own, but that’s what NSOperationQueue —and the lower-level DispatchQueue— does. It also will be more efficient with thread management since it has an intimate understanding of the capabilities of the processor, etc., and will work to do the

Re: Retrieving the EXIF date/time from 250k images

2022-08-16 Thread Steve Christensen via Cocoa-dev
One way to speed it up is to do as much work as possible in parallel. One way —and this is just off the top of my head— is: 1. Create a NSOperationQueue, and add a single operation on that queue to manage the entire process. (This is because some parts of the process are synchronous and might

Re: Points vs pixels in a bash script

2020-06-08 Thread Steve Christensen via Cocoa-dev
I don’t have an answer for your question, and I know that this doesn’t actually answer it below, but it may still provide some info to help you move forward. The windowing system is always working in points from a coordinates point of view. So window.frame and view.frame are in points, not

Re: Relieving memory pressure

2020-06-07 Thread Steve Christensen via Cocoa-dev
For slide shows that I’ve seen, they typically display each image for several seconds at a time. If that’s the case, why can’t you just load the next image from disk on a background queue while the current image is being displayed and not have to worry about memory usage needed to cache

Re: Is CGImage... thread-safe?

2020-05-27 Thread Steve Christensen via Cocoa-dev
> On May 27, 2020, at 3:03 PM, Steve Mills via Cocoa-dev > wrote: > >> I can't recall/reproduce, but it was definitely *inside* >> CGImageSourceCreateThumbnailAtIndex(). >> >> If there is no image a tinder 0, shouldn't it just return NULL gracefully? > > We don’t know that. There are many

Re: Swift -> Obj-C: return __kindof Something

2019-11-11 Thread Steve Christensen via Cocoa-dev
;> On Nov 11, 2019, at 15:07 , Steve Christensen via Cocoa-dev >> mailto:cocoa-dev@lists.apple.com>> wrote: >> >> Some existing Obj-C methods are of the form: >> >> + (nullable __kindof NSManagedObject) someFooThing; >> >> Right now I have

Swift -> Obj-C: return __kindof Something

2019-11-11 Thread Steve Christensen via Cocoa-dev
I’m working on an Obj-C app that got started a bunch of years ago and thought that I would start migrating some of the smaller pieces over to Swift. Some existing Obj-C methods are of the form: + (nullable __kindof NSManagedObject) someFooThing; Right now I have class var

Re: CABasicAnimation does not animate bounds.origin of a layer

2019-09-14 Thread Steve Christensen via Cocoa-dev
First guess would be not to explicitly set -anchorPosition. It defaults to (0.5, 0.5), which refers to the middle of the bounds, and transforms (like scaling) are applied relative to that position. > On Sep 14, 2019, at 6:25 AM, Gabriel Zachmann via Cocoa-dev > wrote: > > Maybe, I haven't

Re: NSManagedObject.managedObjectContext is nil???

2019-03-28 Thread Steve Christensen
Is it possible that the entity is retained but has been deleted from the MOC? I vaguely recall seeing this myself at one point in the dim past. > On Mar 27, 2019, at 1:18 PM, Rick Mann wrote: > > I can't tell. I don't believe I have any unreferenced MOCs. > >> On Mar 27, 2019, at 13:08 , Dave

Re: My eyes are failing me.

2019-02-22 Thread Steve Christensen
Alex, is there any reason you couldn’t have used one of these? [self.sharedData.webServicesURL URLByAppendingPathComponent:@"login"] [self.sharedData.webServicesURL URLByAppendingPathComponent:@"login" isDirectory:{YES|NO}] > On Feb 22, 2019, at 9:40 AM, Alex Zavatone wrote: > > There are 2

Re: assertion failure

2018-04-07 Thread Steve Christensen
It's not uncommon to have a method throw an exception when you make a programming error so that you get immediate feedback. Not knowing offhand which method(s) were called, my guess would be that they're designed to always succeed if you specify the correct parameter values, so the assertion is

Re: Using NSFetchedResultsController with many-to-many relationship

2018-03-10 Thread Steve Christensen
Don't complicate your life by managing multiple NSFetchedResultsControllers. Just create a single one that returns Club entities. For your table view data source methods: func numberOfSections(in tableView: UITableView) -> Int { return frc.fetchedObjects.count } func tableView(_ tableView:

Re: Icon radio buttons

2018-01-24 Thread Steve Christensen
You could manage the button state yourself without a lot of code. @IBOutlet var button1: NSButton// tag = 0 ... @IBOutlet var buttonN: NSButton// tag = N - 1 private var selectedPaletteButtonIndex: Int = 0 private var paletteButtons: [NSButton] override func viewDidLoad() {

Re: Deciphering an error message on an iOS UITextField subclass.

2018-01-17 Thread Steve Christensen
> On Jan 17, 2018, at 5:24 PM, Alex Zavatone wrote: > > po [cell.dataField isKindOfClass:[UITextField class]] Have you tried "print [cell.dataField isKindOfClass:[UITextField class]]", instead, possibly casting the result to bool? The debugger may be getting confused when

Re: Background fetch is never called

2017-12-13 Thread Steve Christensen
ackground execution > time. > On Dec 13, 2017, at 1:31 AM, Viacheslav Karamov <ubuntul...@yandex.ru> wrote: > > Yes, I confirm that > > > 12.12.17 23:16, Steve Christensen wrote: >> Did you confirm that there is a UIBackgroundModes key in your app'

Re: Background fetch is never called

2017-12-12 Thread Steve Christensen
Did you confirm that there is a UIBackgroundModes key in your app's Info.plist? UIBackgroundModes fetch > On Dec 12, 2017, at 6:23 AM, Viacheslav Karamov wrote: > > I have configured Background Fetch at the "Capabilities" tab in my Project's > settings. Then

Re: Avoiding color transformations in PNG/UIImage/CGImage ops?

2017-11-17 Thread Steve Christensen
It sounds like you're looking at image file data rather than buffers of pixel data. If so then I wouldn't make the assumption that the encoded bytes in two PNG files will be identical for identical images. Depending on how flexible the file format is, then particular parts of the encoded image

Re: Getting immutable UIImage data pointer without copy?

2017-11-15 Thread Steve Christensen
On Nov 14, 2017, at 8:37 PM, Rick Mann wrote: > >> On Nov 14, 2017, at 20:18 , Jens Alfke wrote: >> >>> On Nov 14, 2017, at 8:11 PM, Rick Mann wrote: >>> >>> Maybe, at least for the bonus question. The bigger question is

Re: I noticed that my mail address is banned

2017-10-22 Thread Steve Christensen
高田氏、 The word 'pedophilia' in English is shōniseiai' in Japanese. At least in our part of the world, that word has a very negative connotation and its practice is illegal. That is why nobody will visit your website. I would suggest that you consider a different domain name and use a service

Re: Who owns a child view controller?

2017-07-14 Thread Steve Christensen
On Jul 14, 2017, at 8:09 AM, Jeremy Hughes <moon.rab...@virginmedia.com> wrote: > >> On 14 Jul 2017, at 14:40, Steve Christensen <puns...@mac.com> wrote: >> >> On Jul 14, 2017, at 3:50 AM, Jeremy Hughes <moon.rab...@virginmedia.com> >> wrote:

Re: Who owns a child view controller?

2017-07-14 Thread Steve Christensen
On Jul 14, 2017, at 3:50 AM, Jeremy Hughes wrote: > > I’m still not entirely clear on when autorelease pools are used in Swift. > There is a WWDC video which says that they’re used in code that interfaces > with Objective-C, but Greg Parker’s comments in this

Re: Who owns a child view controller?

2017-07-12 Thread Steve Christensen
On Jul 12, 2017, at 1:16 PM, Jeremy Hughes wrote: > >> On 12 Jul 2017, at 19:25, Jens Alfke wrote: >> >>> >>> On Jul 12, 2017, at 10:57 AM, Jeremy Hughes >>> wrote: >>> >>> Wouldn’t it be ARC (rather than the

UIWebView displays margins incorrectly with black background and paginationMode = UIWebPaginationModeLeftToRight

2017-05-04 Thread Steve Christensen
Xcode 8.3.1, iOS Simulator 10.3 and iOS 10.3.1 I am using a paginated UIWebView to display some HTML. Everything appeared to be working OK until I changed the CSS to set the background color to black and the foreground (text) color to white. Then I found that wherever there is a non-zero

Re: What generates NSURLErrorUnsupportedURL?

2017-02-08 Thread Steve Christensen
, 2017, at 2:44 PM, Jens Alfke <j...@mooseyard.com> wrote: >> >>> On Feb 8, 2017, at 10:38 AM, Steve Christensen <puns...@mac.com> wrote: >>> >>> The time between when the request is made and when it completes with an >>> error might be a minute

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

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

Re: 12 hr vs 24 hr time display

2017-01-03 Thread Steve Christensen
On Jan 3, 2017, at 8:26 AM, Sandor Szatmari <admin.szatmari@gmail.com> wrote: > > Steve, > >> On Jan 3, 2017, at 10:17, Steve Christensen <puns...@mac.com> wrote: >> >> In the Date & Time preference panel, I assume that you're referring to th

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: Animating autolayout constraint changes for subviews

2016-12-28 Thread Steve Christensen
nload.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 <puns.

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

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

2016-10-19 Thread Steve Christensen
<z...@mac.com> 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 >> { >>

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(, ^{ sSharedThing =

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

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

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 > { >

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

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

Re: auto-layout and rotated UILabels

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

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

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

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 z...@mac.com 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

debugging UIWebView and audio 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: iOS version check

2015-06-12 Thread Steve Christensen
may be a better way to go. On Jun 12, 2015, at 10:04 AM, Quincey Morris quinceymor...@rivergatesoftware.com wrote: On Jun 12, 2015, at 06:22 , Steve Christensen puns...@mac.com wrote: NSInteger majorSystemVersion = UIDevice.mainDevice.systemVersion.integerValue; On Jun 12, 2015

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 = the wrong value that used to work else AVSpeechUtterance.rate = the right value On Jun 11, 2015, at 10:23 PM,

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: 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: 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

Re: Tracking the retain count

2015-05-19 Thread Steve Christensen
On May 19, 2015, at 8:52 AM, Britt Durbrow bdurb...@rattlesnakehillsoftworks.com wrote: On May 19, 2015, at 7:20 AM, Steve Christensen puns...@mac.com 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

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

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:],

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:

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

Re: Deferred purchase testing in the App Store sandbox?

2014-09-30 Thread Steve Christensen
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 puns...@mac.com wrote: I'm trying to figure out how to test deferred purchases (SKPaymentTransactionStateDeferred) in the sandbox

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

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

2014-09-10 Thread Steve Christensen
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 puns...@mac.com wrote: I have a UITableViewCell with several

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

Re: rotate UI subview (CFAffline Transform)

2014-07-18 Thread Steve Christensen
On Jul 18, 2014, at 4:51 AM, 2551 2551p...@gmail.com wrote: I have a problem which I can't find anyone else asking after hours of searches through stackexchange and the like. In a UIView, I'm rotating a subview with a Gesture recognizer that calls this selector: -

Re: NSReleasePool issue

2014-06-20 Thread Steve Christensen
My main() looks like this. Does yours specify an autorelease pool? int main(int argc, char* argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, @MyDelegateClassName); } } On Jun 19, 2014, at 5:45 PM, Varun Chandramohan

Re: Contribute some dictionary keys with registerDefaults

2014-06-18 Thread Steve Christensen
When you call -setObject:forKey:, it replaces the entire contents of that key, whether the object is a number, string, dictionary, etc. That’s the same behavior as if you called -setObject:forKey: on a regular dictionary when one of its objects is, itself, a dictionary. Depending on what you

Re: JSONSerialization 'Garbage at end' error

2014-04-30 Thread Steve Christensen
I’m already doing downloads in my app using NSURLSession so I used my existing code to download and decode the data returned by the URL below and didn’t get an error. I am building against iOS 7.1 and I tried it out in the simulator. Doing a brief search, it seems like when others are running

Re: Navigation Design question

2014-04-13 Thread Steve Christensen
Why not just make a common UIViewController subclass that manages the global menu button, and then subclass that class for each of the controllers that live on your navigation stack? If it contains the ivar for the UINavigationItem (marked @protected) instead of having that ivar in each of the

iOS: Cannot connect to iTunes Store

2014-04-10 Thread Steve Christensen
I’ve been testing IAP in the sandbox store on a development iPod and just started getting this error in -paymentQueue:updatedTransactions: with (transaction.transactionState == SKPaymentTransactionStateFailed): Error Domain=SKErrorDomain Code=0 Cannot connect to iTunes Store

Re: Custom UITableViewCell parent is NIL

2014-04-08 Thread Steve Christensen
On Apr 7, 2014, at 9:32 PM, Michael de Haan m...@comcast.net wrote: It still however leaves me puzzled as to why I cannot implement Swipe to delete. (the 2 usual suspects), ie -(BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath;

Re: UILabel HTML to attributed string conversion: odd font choice for em text

2013-12-17 Thread Steve Christensen
On Dec 17, 2013, at 1:04 PM, Jens Alfke j...@mooseyard.com wrote: On Dec 17, 2013, at 10:44 AM, Steve Christensen puns...@mac.com wrote: This seems odd to me since there's a perfectly fine Avenir Next Medium Italic available. Is this an expected font choice for italic text given the setup

UILabel HTML to attributed string conversion: odd font choice for em text

2013-12-17 Thread Steve Christensen
I have formatted text delivered to the app as HTML that I am converting to a NSAttributedString and then assigning to a UILabel like this: NSDictionary* options = @{ NSCharacterEncodingDocumentAttribute: @(NSUTF8StringEncoding), NSDefaultAttributesDocumentAttribute:

Re: iOS screen physical size (or px density)

2013-11-25 Thread Steve Christensen
I haven't seen anything that directly returns this information. Given that, it might be better to take the approach of choosing the number of cards that look good on an iPad mini and not worrying so much that there are too few on a full-sized iPad. On Nov 25, 2013, at 4:40 AM, Roland King

Re: Infinite Scroll View?

2013-10-08 Thread Steve Christensen
Does (scrollView.contentOffset.x = 0) not work? How are you testing for it now? On Oct 8, 2013, at 12:20 PM, Dave d...@looktowindward.com wrote: Hi, I finally managed to get back on this! I've got it working when scrolling from left to right and can detect when the user scrolls past the

Re: Infinite Scroll View?

2013-10-07 Thread Steve Christensen
Have you thought about representing your images as cells in a UITableView? If so, you could use something like BBTableView (https://github.com/bharath2020/UITableViewTricks). It's a subclass of UITableView lays out cells along an arc but it also has support for infinite scrolling, so you could

Re: Infinite Scroll View?

2013-10-07 Thread Steve Christensen
add a fragment of an image. Thanks anyway All the Best Dave On 7 Oct 2013, at 18:11, Steve Christensen puns...@mac.com wrote: Have you thought about representing your images as cells in a UITableView? If so, you could use something like BBTableView (https://github.com/bharath2020

Re: How to get variably sized header in a UICollectionView supporting both orientations

2013-10-04 Thread Steve Christensen
On Oct 4, 2013, at 1:52 PM, David Hoerl dho...@mac.com wrote: But its really odd - and I'm thinking about a bug report on this - that the delegate has to provide the size before the view is even created. It make sense if you think about it: it's asking for sizes so that scroll view

Re: Efficient UITableViewCell usage

2013-09-30 Thread Steve Christensen
The table view needs to call -heightForRowAtIndexPath: for each cell in the table, at the very least, so that it knows how tall the table is so that it can set -contentSize on it's underlying scroll view. For performance, you could calculate and cache the cell heights in an array managed by

Re: Optimal height for WebView

2013-01-04 Thread Steve Christensen
On Jan 4, 2013, at 10:40 AM, Mike Abdullah wrote: On 4 Jan 2013, at 18:12, Eric Gorr mail...@ericgorr.net wrote: Good point Mike. However, after it has completed the layout, is it possible to determine the height of the content? If so, i could probably work with that information. But,

Re: stripped down webview

2012-08-18 Thread Steve Christensen
How about asynchronously downloading the page HTML into a string, doing a text replace of the name of the CSS file to your local one, then passing the modified HTML to the web view? Sent from my iPhone On Aug 18, 2012, at 6:52 AM, Koen van der Drift koenvanderdr...@gmail.com wrote: On Aug

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: 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: 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

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 but I

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

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: 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 k...@codeweavers.com 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

Re: IOS graphics

2011-07-11 Thread Steve Christensen
The first thing I notice is that none of the CGContext* calls after UIGraphicsBeginImageContext is referring to that image context so they are having no effect on it. You should move the UIGraphicsGetCurrentContext down after the [drawImage...] call. If you are still not able to get the

Re: How to resolve bulk warning Creating selector for nonexistent method ...?

2011-07-06 Thread Steve Christensen
( XCode-app-menu Empry Caches ). Appearanly some things got corrupted and/or confused on that level. As a nice bonus, i also got about 10Gb of diskspace back. So i have no clue what the real problem was, but it's fixed. thanks, arri On Tue, Jul 5, 2011 at 9:17 PM, Steve Christensen

Re: iOS: AVFoundation, AVAssetWriter and caching

2011-07-06 Thread Steve Christensen
With the caveat that I haven't actually tried it, would it make more sense to be streaming the movie data to a local file, then specifying the URL/path to the file in the initializer method of one of the movie player classes? If the player can handle the case where not all the movie data is

Re: How to resolve bulk warning Creating selector for nonexistent method ...?

2011-07-05 Thread Steve Christensen
For the nonexistent method warnings, your project- or target-level settings likely have Undeclared Selector checked in the GCC warnings section of the build settings. For the multiple selectors warnings, look at the Strict Selector Matching item in the same section. It says this will pop up if

Re: Animating handwriting

2011-06-23 Thread Steve Christensen
Is this a correct interpretation of what you're trying to do? You have a title string that will be drawn in a handwriting font. You wish to reveal each of the letter strokes over time as if someone were actually writing the title on a piece of paper. On Jun 23, 2011, at 9:45 AM, Gustavo

Re: iOS: encoding a custom view with a shape in it

2011-06-15 Thread Steve Christensen
classes to hold the properties (frame, rotation, color, etc.) and to draw those shapes. On Jun 11, 2011, at 6:49 PM, Steve Christensen wrote: And also to clarify, are you freeze drying a view or the objects it draws? You should be doing the latter since that's part of your model. On Jun

Re: iOS: encoding a custom view with a shape in it

2011-06-11 Thread Steve Christensen
How do the results differ between what you saw before and after saving the document? Is everything wrong? or just the scaling, the rotation, what? And to draw an object, are you using an affine transform just to rotate it or for scaling and/or translation as well? On Jun 9, 2011, at 4:25 PM,

Re: iOS: encoding a custom view with a shape in it

2011-06-11 Thread Steve Christensen
And also to clarify, are you freeze drying a view or the objects it draws? You should be doing the latter since that's part of your model. On Jun 11, 2011, at 6:47 PM, Steve Christensen wrote: How do the results differ between what you saw before and after saving the document? Is everything

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

Re: Application Design

2011-06-01 Thread Steve Christensen
, Dan Hopwood d...@biasdevelopment.com wrote: Great, thanks a lot Steve - very helpful. D On 31 May 2011 18:44, Steve Christensen puns...@mac.com wrote: How about providing a singleton class method? Then you just include WebServiceInterface.h where needed. No need to have a global

Re: Application Design

2011-06-01 Thread Steve Christensen
Steve - very helpful. D On 31 May 2011 18:44, Steve Christensen puns...@mac.com wrote: How about providing a singleton class method? Then you just include WebServiceInterface.h where needed. No need to have a global variable. @implementation WebServiceInterface

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,

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

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

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: iOS nib weirdness...

2011-05-06 Thread Steve Christensen
, 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 basic functionality in the view

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

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?

  1   2   3   >