Re: UIDocument + NSFileWrapper crashes on opening

2013-06-20 Thread Luke the Hiesterman
Probably exactly as you said. Try overriding -readFromURL:error: to implement incremental reading. Luke On Jun 20, 2013, at 2:01 PM, Markus Spoettl ms_li...@shiftoption.com wrote: Hello everyone, I have an iOS 6 app that uses UIDocument to implement loading and saving of my app's data.

Re: UIDocument + NSFileWrapper crashes on opening

2013-06-20 Thread Luke the Hiesterman
By default, UIDocument does eager reading. You can override that in -readFromURL:error:. Luke On Jun 20, 2013, at 2:37 PM, Markus Spoettl ms_li...@shiftoption.com wrote: On 6/20/13 11:16 PM, Luke the Hiesterman wrote: Probably exactly as you said. Try overriding -readFromURL:error

Re: UITableCellView width decreases when scrolling

2013-04-16 Thread Luke the Hiesterman
I'm guessing you need to call [self setNeedsDisplay] in the implementation of -[MyCustomView setObject:] Luke On Apr 16, 2013, at 11:25 AM, Koen van der Drift koenvanderdr...@gmail.com wrote: On Apr 15, 2013, at 7:20 AM, Koen van der Drift koenvanderdr...@gmail.com wrote: The reason I

Re: UICollectionViewCell

2013-04-11 Thread Luke the Hiesterman
How are you registering the reuseIdentifier? Do you use registerClass or registerNib? Luke On Apr 11, 2013, at 7:10 PM, koko k...@highrolls.net wrote: I have subclassed UICollectionViewCell as Cell and defined a property: @property (nonatomic, strong) IBOutlet UIImageView *imageView; I

Re: UICollectionViewCell

2013-04-11 Thread Luke the Hiesterman
Yep, you want to use registerNib:forCellWithReuseIdentifier: If you register a class we just alloc/init it for you. Luke On Apr 11, 2013, at 7:24 PM, koko k...@highrolls.net wrote: On Apr 11, 2013, at 8:23 PM, Luke the Hiesterman luket...@apple.com wrote: How are you registering

Re: UI_APPEARANCE_SELECTOR question

2013-02-08 Thread Luke the Hiesterman
Appearance customizations get applied at layout time, so your view simply hasn't had the appearance applied yet in -initWithFrame:. That's why self.tabFont is nil. Luke On Feb 8, 2013, at 1:38 PM, Alex Kac a...@webis.net wrote: Trying to see if I understand this correctly and what I may be

Re: iOS: multiple view controllers, one nib?

2011-05-18 Thread Luke the Hiesterman
The IB concerns aside, attempting to build your own more than one view controller on the screen solution is currently fraught with peril, and something you'll probably get wrong. The window expects to have a single rootViewController to handle rotations and such. You're probably better off

Re: iOS: multiple view controllers, one nib?

2011-05-18 Thread Luke the Hiesterman
, and UISplitViewController do a lot of special work to make everything work right for their contained view controllers. Luke On May 18, 2011, at 12:19 PM, Nathan Sims wrote: Okay, but won't that make for one mega-complex view controller? On May 18, 2011, at 11:58 AM, Luke the Hiesterman wrote

Re: Trying to subclass UISwitch

2011-04-04 Thread Luke the Hiesterman
The UISwitch class is not customizable. And what he really wanted to do was customize the appearance. Luke On Apr 4, 2011, at 3:02 PM, Jeffrey Walton wrote: On Mon, Apr 4, 2011 at 12:20 PM, Philip Ershler ersh...@cvrti.utah.edu wrote: Hi, After beating my head against the wall

Re: UISegmentedControl -selectSegmentAtIndex:?

2011-03-21 Thread Luke the Hiesterman
@property(nonatomic) NSInteger selectedSegmentIndex; so, segmentedControl.selectedSegmentIndex = theIndexYouWant; Luke On Mar 21, 2011, at 6:49 PM, Jon Sigman wrote: iOS 4.3. I'm using a UISegmentedControl and want to preselect one of the segments in -viewDidLoad based on the last user

Re: UITableView: Delay select recognition

2011-01-27 Thread Luke the Hiesterman
On Jan 27, 2011, at 8:17 AM, Phillip Mills wrote: On 2011-01-27, at 10:42 AM, Luke Hiesterman wrote: What is this gesture recognizer you speak of pulling out of the table view? Table view does not use gestures for selection, but you're right that even if it did, you shouldn't mess

Re: UITableViewCell and accessoryView

2011-01-26 Thread Luke the Hiesterman
is store a pointer to the UITableViewCell (or store its index) that has the accessoryView and if any other cell is touched I can remove the accessoryView. Is there a better way to do this. Hrishi On 26-Jan-2011, at 8:51 PM, Luke Hiesterman wrote: On Jan 26, 2011, at 6:17 AM, Hrishikesh

Re: TableView deselection issue

2010-12-10 Thread Luke the Hiesterman
You say you're calling deselectRowAtIndexPath: - tableView:willDeselectRowAtIndexPath: is only called when the row is deselected due to a user action, but in this case it's due to a programmatic action, so the delegate method won't be called. It sounds like what you want to do is to do your

Re: forwarding Touch Events

2010-12-01 Thread Luke the Hiesterman
It sounds like you might be best off doing your touch handling all in the superview. You can marshal all your subviews the way you want from there. There shouldn't be any reason to call touch handling methods yourself. Luke On Dec 1, 2010, at 12:06 PM, Gustavo Pizano wrote: Hello all. in

Re: Phone lock/Apple sounds

2010-09-09 Thread Luke the Hiesterman
This is what push notifications are for. http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Introduction/Introduction.html Luke On Sep 9, 2010, at 5:47 AM, Dan Hopwood wrote: Hi all, My iPhone application continuously pings a back-end

Re: who stole my UIView?

2010-08-12 Thread Luke the Hiesterman
UIView does not maintain a tree. The view tree is really a CALayer tree, where some (or all) of the layers belong to UIView instances. This tie is made by the fact that UIView is the layer's delegate. Thus self.subviews is really self.layer.sublayers for each layer whose delegate is a UIView.

Re: Modal phone calls?

2010-07-27 Thread Luke the Hiesterman
On Jul 27, 2010, at 3:18 PM, Martin Stoufer wrote: I have a working app that is using the openURL: method on its sharedApplication to dial a phone#. The issue I am unable to resolve now is how to get the phone app to 'background' itself once the call is over and bring back my app to the

Re: Subclass UIScrollView or compose?

2010-07-01 Thread Luke the Hiesterman
If you use a UIViewController, then dropping your custom view into UIScrollView in IB should be completely straightforward for all your uses. Luke On Jul 1, 2010, at 3:29 PM, Rick Mann wrote: I'm developing a custom scrolling view, and I could either subclass UIScrollView, or subclass

Re: Subclass UIScrollView or compose?

2010-07-01 Thread Luke the Hiesterman
simply looking for the best way for my UIScrollView subclass to actually get updates as its scrolled. If it's really not good to subclass UIScrollView, why does UITableView do so? TIA, Rick On Jul 1, 2010, at 15:36:21, Luke the Hiesterman wrote: If you use a UIViewController

Re: Using table view cells from nibs

2010-05-29 Thread Luke the Hiesterman
I realized we're talking about different things. My mind when instantly to UITableView and I didn't realize we were talking about NSTableView. I can only speak for UITableView :) Luke On May 29, 2010, at 9:45 AM, Quincey Morris wrote: On May 29, 2010, at 08:56, Luke Hiesterman wrote: I'm

Re: Exit( ) necessary? (oalTouch sample project)

2010-05-27 Thread Luke the Hiesterman
That is most likely there for simplicity of the code example. Since Touch is in the name, I'm assuming this example is for iPhoneOS? If so, please remember that exit() should never be called in an iPhone program. Only the user should exit your program. Luke On May 27, 2010, at 2:37 PM, Philip

Re: selecting a row of a UITableView programatically

2010-05-26 Thread Luke the Hiesterman
Since nibs are loaded lazily, controller.unitTableView is probably nil when you call selectRowAtIndexPath:. Luke On May 26, 2010, at 5:24 PM, Alejandro Marcos Aragón wrote: Hi all, Can someone tell me why the following code doesn't work? - (void) showInfo {

Re: UITabBar as a UISegmentedControl???

2010-05-25 Thread Luke the Hiesterman
While this may be possible, it doesn't sound like a good idea. The big question it raises is why do you want to do this? As you have of course observed, we already have UISegmentedControls. What are you trying to accomplish? Luke On May 25, 2010, at 6:23 PM, Alejandro Marcos Aragón wrote: Hi

Re: Including UIImageView to Scroll down with UITableView

2010-05-03 Thread Luke the Hiesterman
Your explanation of what you are doing now is incredibly vague (what do you mean by placing a UIImageView above a UITableView?) but I assume the answer you're looking for is to set your image view as the tableHeaderView. It will then appear at the top of the table and scroll along with it.

Re: [iPhone] How to scroll to UITableView footer view

2010-05-01 Thread Luke the Hiesterman
UITableView is a subclass of UIScrollView. So, you can ask for its contentSize and then call scrollRectToVisible:animated: with a rect that lies at the end of the contentSize. Luke On May 1, 2010, at 7:52 PM, Tharindu Madushanka wrote: Hi, How can I scroll to a UITableView footer all the

Re: Supporting different orientations with UITabBarView?

2010-04-17 Thread Luke the Hiesterman
Each respective's tab's viewController must return YES from shouldAutorotateToInterfaceOrientation for the tabBarController to autorotate, not just the currently visible one. Luke On Apr 17, 2010, at 11:48 AM, Laurent Daudelin wrote: Not sure what I'm missing here but obviously, I'm missing

Re: UITabBarItem's frame?

2010-04-13 Thread Luke the Hiesterman
Please file an enhancement request. Luke On Apr 13, 2010, at 12:12 AM, Mike Manzano wrote: Hello, Is there a way to get a UITabBarItem's frame? I'd like to implement a popover-like menu whose arrow points to a particular UITabBarItem (on the iPhone, not iPad). However, UITabBarItems are

Re: iPad: UIImagePickerController

2010-04-07 Thread Luke the Hiesterman
On Apr 7, 2010, at 1:37 PM, Development wrote: How do you use the image picker controller on the iPad? My iphone version works fine but I get a UI Mess on the iPad. (Part of the nav bar loads and nothing else.) Anyway so I tried if ([[[UIDevice

Re: UITable Views and display lags

2010-03-19 Thread Luke the Hiesterman
You should display a place-holder image in the tableView cells so that your app doesn't hang. You can then fetch the images asynchronously and replace the placeholder images with the real images as they become available. You should not do anything to interrupt smooth scrolling. Luke On Mar

Re: UIApplication terminate?

2010-03-16 Thread Luke the Hiesterman
On Mar 16, 2010, at 1:41 AM, Steve Cronin wrote: Folks; I have an iPhone application that is used for a very specific purpose. After perusing and modifying data the user is given the option to effectively [Cancel] or [Save] After they have made their decision the app's purpose has

Re: [[Class alloc] init] preferable over [[Class instance] retain]?

2010-03-09 Thread Luke the Hiesterman
On Mar 9, 2010, at 1:41 PM, Laurent Daudelin wrote: I've been running in that situation and I'm just wondering if there are any advice for/against one or the other method. For example, is: NSMutableArray *anArray = [[NSMutableArray array] retain]; There is no reason to use this when

Re: UILabel updating from a button click

2010-02-21 Thread Luke the Hiesterman
Please don't use sleep() on the main thread of a UI application.. If you really want to do this, I'd suggest using an ivar or a static variable to facilitate going through the operation using performSelector:withObject:afterDelay: e.g.: static int labelLoopCounter = 10;

Re: super call in the middle of a block of code ..

2010-02-18 Thread Luke the Hiesterman
This seems fine to me. Generally, when subclassing, the contract is that you must call super - there is nothing said about where in your method you do so. Luke On Feb 18, 2010, at 5:58 AM, Roland King wrote: I have this piece of code in my UITableViewController subclass (that is also my

Re: iPhone: Lost with GK

2010-02-07 Thread Luke the Hiesterman
The size sounds like a problem. I don't remember the exact limit, but I seem to recall the send buffer is just under 100k. You'll want to break that up into packets. Luke On Feb 7, 2010, at 8:53 AM, Development wrote: Ok I think I am making headway. I am storing an NSDictionary object

Re: [iPhone] Sample code for live camera stream?

2010-02-04 Thread Luke the Hiesterman
I haven't seen the app, but the simplest way to transform the camera input is via the cameraViewTransform property on UIImagePickerController available in 3.1 Luke On Feb 4, 2010, at 8:48 PM, Kyle Sluder wrote: You can get the video data now using UIGetScreenImage, though it's not the

Re: UIImageView display as multiply?

2010-01-22 Thread Luke the Hiesterman
You should perform whatever blending you need to do on the image itself to create a new image which you can then just put into a UIImageView like you would any other image. This way, you only have to blend once, and then it's just image that can be straight drawn rather than performing a

Re: UIImageView display as multiply?

2010-01-22 Thread Luke the Hiesterman
that? On Fri, Jan 22, 2010 at 9:52 AM, Luke the Hiesterman luket...@apple.com wrote: You should perform whatever blending you need to do on the image itself to create a new image which you can then just put into a UIImageView like you would any other image. This way, you only have to blend once

Re: [iPhone] Adding a UIView to current view

2010-01-21 Thread Luke the Hiesterman
Standard first question: did you verify that myBubble is non-nil? Another note: it's weird that you do [self.view addSubview:myBubble] when through the rest of the method you always use self.myBubble. You should stick to using your property. Luke On Jan 21, 2010, at 3:33 PM, Philip Vallone

Re: iPhone: UITableView with cells of varying heights

2010-01-14 Thread Luke the Hiesterman
Calculate label height with [NSString sizeWithFont:ForWidth:LineBreakMode:]. sizeWithFont:forWidth:lineBreakMode: Assign cell row heights with [UITableViewDelegate tableView:heightForRowAtIndexPath:] – tableView:heightForRowAtIndexPath: Luke On Jan 14, 2010, at 6:46 AM, Eric E. Dolecki wrote:

Re: iPhone: UITableView with cells of varying heights

2010-01-14 Thread Luke the Hiesterman
/UITableViewDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/UITableViewDelegate/tableView:heightForRowAtIndexPath: Luke On Jan 14, 2010, at 6:56 AM, Luke the Hiesterman wrote: Calculate label height with [NSString sizeWithFont:ForWidth:LineBreakMode

Re: UITableView / iPhone Calendar List View Question

2009-12-17 Thread Luke the Hiesterman
You can tell the tableView that you have a very large number of rows. tableView:cellForRowAtIndexPath: is only called when a cell will actually come into view, so even though you claim your table to be very large, not all cells are loaded immediately. Luke On Dec 17, 2009, at 7:01 PM,

Re: UITableView / iPhone Calendar List View Question

2009-12-17 Thread Luke the Hiesterman
Yes, eventually the calendar list view will come to an end. I'm able to hit that point easily by scrolling fast for several seconds on my phone. Luke On Dec 17, 2009, at 7:11 PM, Karolis Ramanauskas wrote: On Thu, Dec 17, 2009 at 9:05 PM, Luke the Hiesterman luket...@apple.com wrote: You

Re: UITableView / iPhone Calendar List View Question

2009-12-17 Thread Luke the Hiesterman
wrote: On Thu, Dec 17, 2009 at 9:13 PM, Luke the Hiesterman luket...@apple.com wrote: Yes, eventually the calendar list view will come to an end. I'm able to hit that point easily by scrolling fast for several seconds on my phone. Luke Ah, I see! So it's all an illusion! ;) Thanks. Just

Re: pls explain rotated iPhone coordinates to me

2009-12-15 Thread Luke the Hiesterman
First of all, it's important for you to mention where this code gets called. Without that, we can't know the whole story, but I'll grant some notes. On Dec 14, 2009, at 6:46 PM, Matt Neuburg wrote: I am not grasping how coordinates work in a rotated iPhone app, and I'm hoping someone

Re: pls explain rotated iPhone coordinates to me

2009-12-15 Thread Luke the Hiesterman
You should probably post a sample project which demonstrates this. Luke On Dec 15, 2009, at 9:09 AM, Matt Neuburg wrote: On or about 12/15/09 7:00 AM, thus spake Luke the Hiesterman luket...@apple.com: should be using a rect based on the bounds Okay, but things are still reversed from

Re: [iPhone] Sample code for live camera stream?

2009-12-15 Thread Luke the Hiesterman
There is not currently API for this. The API allows you to place overlays on the screen, but video data is not delivered to your app until the user is finished recording. Luke On Dec 15, 2009, at 9:24 AM, Gabriel Zachmann wrote: I am having problems of getting live images from the iPhone's

Re: [iPhone] Sample code for live camera stream?

2009-12-15 Thread Luke the Hiesterman
On Dec 15, 2009, at 3:11 PM, Gabriel Zachmann wrote: According to this http://www.tuaw.com/2009/12/14/app-store-approved-app-brings-video-recording-to-iphone-3g-and-1/ they use the non-documented UIGetScreenImage(). I'd love to use that if it's the only way -- if only somebody could

Re: [iPhone] Animate tableView reloadData

2009-12-11 Thread Luke the Hiesterman
There's a set of methods in UITableView for animated table updates. All the insert/delete/road calls should be within a beginUpdates/ endUpdates block. - (void)beginUpdates; // allow multiple insert/delete of rows and sections to be animated simultaneously. Nestable - (void)endUpdates;

Re: .h file won't load

2009-12-10 Thread Luke the Hiesterman
The NSStringDrawing.h header is include in AppKit.h, so you should just be able to include AppKit like this: #include AppKit/AppKit.h Were you forgetting the and ? Luke On Dec 10, 2009, at 11:51 AM, Charlie Dickman wrote: I'm developing an app that has the Appkit.framework in the

Re: UINavigationBar, setTintColor: and UIColor colorWithPatternImage:

2009-12-09 Thread Luke the Hiesterman
Do you really expect that a patterned image would work well in this case? A tint obviously gets applied to the color that is set to create the actual background, and remember that the background of the bar gets mirrored in any buttons on the bar, which seems destined to look awkward if

Re: [iPhone] UINavigationController and UINavigationBar

2009-12-09 Thread Luke the Hiesterman
, though. Luke On Dec 9, 2009, at 9:27 AM, Alex Kac wrote: I haven’t tried this, but could the OP get what he wants by setting a tint color of clearColor and then set a background pattern image on the window itself? On Dec 8, 2009, at 5:57 PM, Luke the Hiesterman wrote: On Dec 8, 2009

Re: [iPhone] UINavigationController and UINavigationBar

2009-12-08 Thread Luke the Hiesterman
You could subclass UINavigationController. Luke On Dec 8, 2009, at 9:46 AM, Duccio wrote: Hi. I created CustomNavBar subclassing UINavigationBar. In Interface Builder I drag a Navigation Controller (UINavigationController) from the library to the document. Under this object in document

Re: [iPhone] UINavigationController and UINavigationBar

2009-12-08 Thread Luke the Hiesterman
On Dec 8, 2009, at 12:49 PM, Aldo Armiento wrote: But it seems that in this case I can't use my UINavigationBar subclass if I instantiate a Navigation Controller programmatically, so the only way to use my UINavigationBar subclass is to instantiate a Navigation Controller in IB otherwise

Re: [iPhone] UINavigationController and UINavigationBar

2009-12-08 Thread Luke the Hiesterman
On Dec 8, 2009, at 1:13 PM, Duccio wrote: Il giorno 08/dic/2009, alle ore 21.53, Luke the Hiesterman ha scritto: On Dec 8, 2009, at 12:49 PM, Aldo Armiento wrote: But it seems that in this case I can't use my UINavigationBar subclass if I instantiate a Navigation Controller

Re: [iPhone] UINavigationController and UINavigationBar

2009-12-08 Thread Luke the Hiesterman
On Dec 8, 2009, at 3:51 PM, Mike Abdullah wrote: Other alternatives: - Subclass UINavigationController to return a custom view from -navigationBar. - Add a custom subview to the nav bar to do your drawing. I recommend neither of these. It's already been brought up that

Re: [iPhone] UINavigationController and UINavigationBar

2009-12-08 Thread Luke the Hiesterman
On Dec 8, 2009, at 4:40 PM, Duccio wrote: Il giorno 09/dic/2009, alle ore 00.57, Luke the Hiesterman ha scritto: On Dec 8, 2009, at 3:51 PM, Mike Abdullah wrote: Other alternatives: - Subclass UINavigationController to return a custom view from -navigationBar. - Add a custom

Re: Use of preprocessor macros

2009-12-01 Thread Luke the Hiesterman
Don't you mean #ifdef foo rather than #if foo? Luke On Dec 1, 2009, at 4:59 PM, Graham Cox wrote: Just a quickie. I'm defining a preprocessor macro in the 'GCC 4.2 - Preprocessing / preprocessor macros' section of my project's build properties, e.g. foo=1. This is set only in the debug

Re: int* array going astray

2009-11-24 Thread Luke the Hiesterman
This is why some people write if (0 == _state[i]). A mistake there will definitely generate a compiler error. Luke On Nov 24, 2009, at 8:35 PM, James Maxwell wrote: how do you spell total frustration and stupidity? how about writing: if(_state[i] = 0) when you really mean: if(_state[i] ==

Re: Custom Tableview cell and grouped tables

2009-11-19 Thread Luke the Hiesterman
You can't change the style of a table after it's been created. Only place to set the table's style is initWithFrame:style: Luke On Nov 19, 2009, at 11:17 AM, Mark Bateman wrote: 1. this is iphone 2. after i change the UItableview style to the grouped style the table continues to show as

Re: Custom Tableview cell and grouped tables

2009-11-19 Thread Luke the Hiesterman
to compiling, not on the fly in the application, if that helps. On Nov 19, 2009, at 2:19 PM, Luke the Hiesterman wrote: You can't change the style of a table after it's been created. Only place to set the table's style is initWithFrame:style: Luke On Nov 19, 2009, at 11:17 AM, Mark Bateman wrote

Re: [iPhone] UITableView section header title color

2009-11-18 Thread Luke the Hiesterman
You can provide a custom header view for each section through the tableView's delegate. You can do whatever you want within that view. Luke On Nov 18, 2009, at 11:06 AM, Tharindu Madushanka wrote: Hi Could we customize the UITableView section header title color programatically other than

Re: [iPhone] customizing UIView animation run background color

2009-11-17 Thread Luke the Hiesterman
self.view.backgroundColor = [UIColor blueColor]; //cause why not blue? Luke On Nov 17, 2009, at 7:32 AM, Tharindu Madushanka wrote: Hi I am using following method to flip between UIViews that have imageviews on it as background. When I animate the views. I could see white background

Re: iPhone: how to tell if a UIScrollView is scrolling?

2009-11-10 Thread Luke the Hiesterman
@property(nonatomic,readonly,getter=isDragging) BOOL dragging;// returns YES if user has started scrolling. this may require some time and or distance to move to initiate dragging Luke On Nov 10, 2009, at 9:18 AM, John Michael Zorko wrote: Hello, all ... After making the

Re: Overriding -[UIViewController loadView], and loading from a nib

2009-11-03 Thread Luke the Hiesterman
You should pick one place or the other to do your nib loading. If you choose to do it yourself, then don't hook up IB to automatically load the view controller's nib. Then you can safely call [super loadview] followed by your own code which includes loading the view from the nib.

Re: Overriding -[UIViewController loadView], and loading from a nib

2009-11-03 Thread Luke the Hiesterman
the nib loading yourself in code. Those are the options. Luke On Nov 3, 2009, at 9:20 AM, Jonathan del Strother wrote: Sorry - I'm not following. What did you mean by hooking up IB to auto-load the nib? 2009/11/3 Luke the Hiesterman luket...@apple.com: You should pick one place or the other

Re: why use pow(x, 2)?

2009-11-02 Thread Luke the Hiesterman
On Nov 2, 2009, at 11:01 AM, Chunk 1978 wrote: i just came across some code, and i'm trying to understand why the developer chose to use the pow() function instead of simply multiplying as the 2nd arguments are always 2. i'm certainly no mathematician, but if the 2nd argument is going to

Re: why use pow(x, 2)?

2009-11-02 Thread Luke the Hiesterman
On Nov 2, 2009, at 11:25 AM, Ed Wynne wrote: On Mon, Nov 2, 2009 at 2:07 PM, Jens Alfke j...@mooseyard.com wrote: On Nov 2, 2009, at 11:01 AM, Chunk 1978 wrote: why use this: float dist = pow(red - r, 2) + pow(green - g, 2) + pow(blue - b, 2); instead of: float dist = ((red - r) * 2) +

Re: why use pow(x, 2)?

2009-11-02 Thread Luke the Hiesterman
On Nov 2, 2009, at 11:36 AM, Sherm Pendley wrote: On Mon, Nov 2, 2009 at 2:25 PM, Ed Wynne ar...@phasic.com wrote: That said, the original question is a good one. Using x*x instead of pow(x,2) would be quite a bit faster Are you certain of that? With loop unrolling and inlined functions,

Re: why use pow(x, 2)?

2009-11-02 Thread Luke the Hiesterman
On Nov 2, 2009, at 12:15 PM, Stephen J. Butler wrote: On Mon, Nov 2, 2009 at 2:03 PM, Stephen J. Butler stephen.but...@gmail.com wrote: On Mon, Nov 2, 2009 at 1:37 PM, Luke the Hiesterman luket...@apple.com wrote: Would it really be that much faster? I don't know exactly how pow

Re: why use pow(x, 2)?

2009-11-02 Thread Luke the Hiesterman
I can't speak for others, but I never meant to actually argue that pow (x, 2) is clearer than x * x. My argument was that each author should use whichever version he or she thinks is clearer. There are rarely absolutes about that sort of thing, as clarity is subjective by its very nature. I

Re: why use pow(x, 2)?

2009-11-02 Thread Luke the Hiesterman
On Nov 2, 2009, at 3:22 PM, Bob Smith wrote: All you youngsters who never ran an app on a CPU at less than GHz speeds, you ought to be forced to write code for an early-80's PC. Now that was _real_ programming! Also simply isn't reality anymore. Period. No matter how nostalgic you wish

Re: iPhone: How to show another view on UITableView

2009-10-31 Thread Luke the Hiesterman
No. Use the tableFooterView. That's what it's for. Luke On Oct 31, 2009, at 8:21 AM, Fritz Anderson wrote: On 30 Oct 2009, at 9:59 PM, Symadept wrote: I wanna show another image view in the bottom of the UITableView. Any pointers please. Add a section with no rows. Return your view as

Re: iPhone: How to show another view on UITableView

2009-10-31 Thread Luke the Hiesterman
That's a little strange.why do that rather than using a footer view on an actual section? Luke On Oct 31, 2009, at 8:29 AM, Fritz Anderson wrote: On 31 Oct 2009, at 10:26 AM, Luke the Hiesterman wrote: No. Use the tableFooterView. That's what it's for. Ouch. I'd been using

Re: iPhone: How to show another view on UITableView

2009-10-31 Thread Luke the Hiesterman
AM, Luke the Hiesterman wrote: That's a little strange.why do that rather than using a footer view on an actual section? Luke On Oct 31, 2009, at 8:29 AM, Fritz Anderson wrote: On 31 Oct 2009, at 10:26 AM, Luke the Hiesterman wrote: No. Use the tableFooterView. That's what it's

Re: iPhone: How to show another view on UITableView

2009-10-31 Thread Luke the Hiesterman
, Luke the Hiesterman wrote: Yeah, I get thatI don't understand why you would create this void section just to display a footer view when you could simply display the footer view on a section that actually has rows. Since you said you're doing this in the middle of the table, I'm assuming

Re: How to perform upgrade testing for iPhone App

2009-10-27 Thread Luke the Hiesterman
Installing your 1.1 candidate app over the 1.0 app via xcode should be a good equivalent to the user scenario. Luke On Oct 27, 2009, at 10:58 AM, john chen wrote: Greetings, Say I have app version 1.0 released on the app store. Now I am planning on a 1.1 upgrade. What is the test that

Re: Recreating iPhone alarm Picker

2009-10-19 Thread Luke the Hiesterman
Just use a UIDatePicker on mode UIDatePickerModeTime or UIDatePickerModeDateAndTime and you should be all set. Luke On Oct 19, 2009, at 6:44 AM, Eric E. Dolecki wrote: I have a fairly noob question in regards to recreating an alarm view using a Picker control. On the iPhone, the values

Re: iPhone: UIDatePicker - setting the time?

2009-10-19 Thread Luke the Hiesterman
You're looking for the date property on UIDatePicker. Luke On Oct 19, 2009, at 10:01 AM, Eric E. Dolecki wrote: I am trying to set a UIDatePicker (in Time mode) to a specific hour, minute and am/pm. I assume that I need to create a NSDate object with said hr, min, ampm then apply it to my

Re: Mixed font sizes in a UILabel?

2009-10-15 Thread Luke the Hiesterman
If you don't want to use labels, you can draw the text yourself using UIStringDrawing methods. Otherwise, you need two labels for this. Luke On Oct 15, 2009, at 6:45 AM, Eric E. Dolecki wrote: I have a simple question. In my application (iPhone) I am displaying the current time.

Re: Reacting to UIBarButtonItem

2009-10-07 Thread Luke the Hiesterman
Target and action is the way to go. There must be an error in doing so, probably a typo in setting the action selector. Remember that colons are part of selector names Luke On Oct 7, 2009, at 5:25 PM, Anthony Smith wrote: I have a settings pane similar to Weather's settings pane. I

Re: Reacting to UIBarButtonItem

2009-10-07 Thread Luke the Hiesterman
viewDidLoad]; [doneButton setTarget:self]; [doneButton setAction:@selector(displayShuffleView:)]; } I'm not sure what's up. self is a UIViewController. I put log statements to check for a trigger but nothing is coming through. On Oct 7, 2009, at 8:32 PM, Luke

Re: Reacting to UIBarButtonItem

2009-10-07 Thread Luke the Hiesterman
probably missing something simple here. On Oct 7, 2009, at 8:49 PM, Luke the Hiesterman wrote: I'd verify that doneButton != nil. If you created this in a nib, you might have forgotten to wire it up. Luke On Oct 7, 2009, at 5:40 PM, Anthony Smith wrote: Here's what I'm doing. - (void

Re: class variables

2009-10-06 Thread Luke the Hiesterman
The canonical implementation of a singleton class uses a static to hold the singleton instance. There are other examples in Apple sample code of using class statics. So, I would say that it's not frowned upon as long as there's a good reason to do it. Luke On Oct 6, 2009, at 4:48 PM,

Re: View shifted up on iPhone simulator

2009-10-02 Thread Luke the Hiesterman
Views shouldn't be drawn to the full height of 480 unless you intend to hide the status bar. The application window extends behind the status bar, so if you add a view to the window with frame.origin.y = 0.0, it will be behind the status bar. Unless you're hiding the status bar, your

Re: UITableView Custom cell with image

2009-09-22 Thread Luke the Hiesterman
First, you should be reusing table cells as a basic first step. If you're not doing that, start now. Second, you should solve your stutter problem by returning the cell right away and asynchronously loading the image into the cell. If you don't hold up cell creation/ display on loading of

Re: Static Analyzer and Core Foundation

2009-09-18 Thread Luke the Hiesterman
Line 44 creates 2 objects, one goes into the dictRef, the other is not assigned to a variable, but is used only as the second argument to MDItemCopyAttributes. The object that you create inside that call is never released. Luke On Sep 18, 2009, at 4:33 PM, Steve Cronin wrote: Folks;

Re: Static Analyzer and Core Foundation

2009-09-18 Thread Luke the Hiesterman
There's not enough code here to give a good answer to question 1. Luke On Sep 18, 2009, at 4:39 PM, Steve Cronin wrote: Luke; OK thank-you for that answer to question 2! Any thoughts on question 1? Steve On Sep 18, 2009, at 6:36 PM, Luke the Hiesterman wrote: Line 44 creates 2 objects

Re: GameKit Detecting Bluetooth

2009-09-15 Thread Luke the Hiesterman
If you use the GKPeerPickerController for connecting to peers, bluetooth capabilities are automatically detected and bluetooth can be automatically turned on if necessary. Luke On Sep 15, 2009, at 8:37 AM, Development wrote: Well, I've had some odd experiences with the game kit. For

Re: GameKit Detecting Bluetooth

2009-09-15 Thread Luke the Hiesterman
15, 2009, at 8:40 AM, Luke the Hiesterman wrote: If you use the GKPeerPickerController for connecting to peers, bluetooth capabilities are automatically detected and bluetooth can be automatically turned on if necessary. Luke On Sep 15, 2009, at 8:37 AM, Development wrote: Well, I've had

Re: Table cell: how show blue when tapped only while editing is true?

2009-09-10 Thread Luke the Hiesterman
When you want nothing to happen, cell.selectionStyle = UITableViewCellSelectionStyleNone; When you want blue, cell.selectionStyle = UITableViewCellSelectionStyleBlue; Luke On Sep 9, 2009, at 11:42 PM, Steve Fogel wrote: Hi, all... I've got a table view for which users must tap an Edit

Re: UIImagePickerController problem

2009-09-10 Thread Luke the Hiesterman
You're better off filing a feature request for a landscape image picker. Honestly, though, I don't see landscape as an orientation that makes sense for picking images on the phone. Luke On Sep 10, 2009, at 8:10 AM, Development wrote: I'm working on an app that is in landscapeleft mode most

Re: atanch...@live.com

2009-09-08 Thread Luke the Hiesterman
Mind if I ask what is the app that you saw doing this? Luke On Sep 8, 2009, at 3:44 AM, Angelica Grace Tanchico wrote: Hello, I just want to ask, how can I access/add in my app (if possible) the Favorites list on the iPhone Phone app? I saw an application that has synchronized Favorites

Re: [iPhone] : How to customize Phonepad ?

2009-09-08 Thread Luke the Hiesterman
You can't customize the phone pad, which is really just an instance of a keyboard. For the stuff you want to do, you should write your own custom view that behaves as you desire. Luke On Sep 8, 2009, at 7:48 AM, Dan Ribe wrote: Sorry for my last mail ... It got sent while I was typing !

Re: [iPhone] : How to customize Phonepad ?

2009-09-08 Thread Luke the Hiesterman
That is an EXTREMELY fragile approach. Chunk mentioned the international keyboard issue, but there's also the issue of software updates. Keyboards are subject to change with new releases. You should never overlay views on top of the built-in keyboard. If you really want custom stuff, write

Re: I can't find it in the docs so I know I'm missing it some where

2009-08-31 Thread Luke the Hiesterman
Free apps cannot use in-app purchase. You must charge at least 99 cents. Luke On Aug 31, 2009, at 9:44 AM, Development wrote: Are apps that are offered for free not allowed to use the store kit? It seems foolish to have an app the requires a subscription that is not a free download.

Re: How to create GPS enabled Iphone application?

2009-08-26 Thread Luke the Hiesterman
Read: http://developer.apple.com/iphone/library/documentation/CoreLocation/Reference/CoreLocation_Framework/index.html Luke On Aug 26, 2009, at 6:27 AM, Jeffrey Oleander wrote: On Wed, 2009/08/26, rethish reth...@newtok.com wrote: From: rethish reth...@newtok.com Subject: How to create GPS

Re: How to create GPS enabled Iphone application?

2009-08-26 Thread Luke the Hiesterman
As stated, the application doesn't get to decide whether location services are on or off. It can only request them or not request them. Also, the user can override an application's request for location info. Luke On Aug 26, 2009, at 7:23 AM, I. Savant wrote: On Aug 26, 2009, at 10:19 AM,

Re: How to create GPS enabled Iphone application?

2009-08-26 Thread Luke the Hiesterman
On Aug 26, 2009, at 8:33 AM, Jeffrey Oleander wrote: On Wed, 2009/08/26, Luke the Hiesterman luket...@apple.com wrote: From: Luke the Hiesterman luket...@apple.com Subject: Re: How to create GPS enabled Iphone application? To: I. Savant idiotsavant2...@gmail.com Cc: Jeffrey Oleander jgo

Re: [IPhone 3.0] How do I make a UITextField the first responder?

2009-08-25 Thread Luke the Hiesterman
On Aug 25, 2009, at 6:33 AM, Andy Lee wrote: You seem to be right about this part -- becomeFirstResponder doesn't bring up the keyboard for me, or I'm doing something wrong. Are you sure the text field isn't nil when you're calling this? Maybe it's loaded from a nib and you forgot to wire

Re: [IPhone 3.0] How do I make a UITextField the first responder?

2009-08-25 Thread Luke the Hiesterman
Obvious question is, then, where are you calling it? Luke On Aug 25, 2009, at 6:37 AM, Andy Lee wrote: On Aug 25, 2009, at 9:34 AM, Luke the Hiesterman wrote: On Aug 25, 2009, at 6:33 AM, Andy Lee wrote: You seem to be right about this part -- becomeFirstResponder doesn't bring up

  1   2   3   >