Re: Load View Controller Nib without pushing it?

2010-11-16 Thread Brian Slick
On Nov 16, 2010, at 4:50 PM, Laurent Daudelin wrote: > On Nov 16, 2010, at 13:34, Dave Carrigan wrote: > >> On Nov 16, 2010, at 1:29 PM, Laurent Daudelin wrote: >>> Hello. >>> >>> I'm stomped by a strange problem. I've been working with a UIViewController >>> subclass and it's been working fin

iPad Custom Font Issue

2010-09-28 Thread Brian Slick
A client has provided 4 fonts they would like me to use in their iPad app. These fonts are all from the same family, just with different line weights. (light, normal, bold, etc). They are *.otf files. I have added them to the project, and listed them in info.plist. I put together a quick te

Re: Simple instance [[alloc] init] question.

2010-08-30 Thread Brian Slick
#1 is a leak. (I'm assuming that "release" is supposed to be "retain" in the property declaration) Brian On Aug 30, 2010, at 8:23 PM, Frederick C. Lee wrote: > Which is the preferred method of object allocation & initialization? > > .h > @property(nonatomic, release) IRMSerialDetailsDO *seria

Re: Using a UIButton as cell accessory view in plain UITableView

2010-06-03 Thread Brian Slick
Get the superview (possible the superview's superview) for the button (sender). Once you have the cell, ask the table for the index path. Brian On Jun 3, 2010, at 11:38 AM, Tino Rachui wrote: > On the iPhone I have a plain table. Every cell should have a UIButton as > accessory view. I confi

Re: [iphone] UITableViewCell set cell attributes based on indexPath.row number

2009-11-23 Thread Brian Slick
The stuff outside of the if (cell == nil) block will be performed on each cell, whether new or reused. You need to assume that the current display of the cell is "wrong", and do what is necessary to make it right. In this case, if one of your red cells gets reused for rows 0-3, there is nothin

Re: UITableView updating problem

2009-08-13 Thread Brian Slick
On Aug 13, 2009, at 8:31 AM, glenn andreas wrote: You're using a sledge hammer (reloadData) when you need a small screwdriver. From UITableView.h: - (void)reloadData; // reloads everything from scratch. redisplays visible rows. --> because we only keep info about visible

Re: Cahnging bgColor of a UIView not working.

2009-07-29 Thread Brian Slick
On Jul 29, 2009, at 12:56 PM, David Duncan wrote: On Jul 29, 2009, at 4:52 AM, Brandon Walkin wrote: The arguments to that UIColor method should be in the range of 0 to 1. Divide each RGB value by 255 to get them into that range. This is more of a PSA than anything (because I've seen more

Re: [iPhone] Why can't a UITextField be its own delegate?

2009-07-25 Thread Brian Slick
I won't pretend to know the answer, but this struck me as odd: On Jul 25, 2009, at 3:06 PM, WT wrote: - (void) awakeFromNib { super.delegate = self; super.text = @"Hello world"; NSLog(@"awakeFromNib called - delegate set to self"); } Shouldn't it be [self setDelegate: self]? I wou

Re: Show UIButton Highlight Without Touching?

2009-07-20 Thread Brian Slick
[yourButton setHighlighted: YES]? (from UIControl) Brian On Jul 20, 2009, at 4:14 PM, Chunk 1978 wrote: is there a method within the iPhone SDK that will set off the highlight of a button without actually touching the button? i have a lock button that locks a movable object on screen. if t

Re: Maybe I've misunderstood something

2009-07-18 Thread Brian Slick
Does your app have a reason to display a number on the icon? A couple different apps on my phone display it for: * To-do app showing the number of items remaining to be done * Calendar app showing the number of birthdays coming up AFAIK, all that 3.0 added was the ability to set the badge via

Re: Iphone Grouped Table View for Settings

2009-07-17 Thread Brian Slick
On Jul 17, 2009, at 9:39 AM, Trygve Inda wrote: Look at the table view programming guide for how to build custom table cells. Just think of each cell as a custom view. They can even be built in IB easily enough. Drag UITableViewCell objects into your nib and lay them out however you like. Lu

Re: Iphone Grouped Table View for Settings

2009-07-16 Thread Brian Slick
I haven't played with sliders, but here is an example for a switch: UITableViewCell *yourCell = [tableView dequeueReusableCellWithIdentifier:YourCellIdentifier]; if (yourCell == nil) { yourCell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:YourCel

Re: Design for custom tableviewcell button action

2009-07-03 Thread Brian Slick
On Jul 3, 2009, at 4:39 PM, mmalc Crawford wrote: On Jul 3, 2009, at 11:54 AM, Brian Slick wrote: I did make a slight adjustment to the technique - most significantly the omitting of the identifier in the XIB file, This is actually a very significant factor. If you haven't s

Re: Design for custom tableviewcell button action

2009-07-03 Thread Brian Slick
Well, at first I really liked this technique, and it seems simple enough. I restructured my program to use it, and in the simulator all went well. Then I uploaded to the phone (1st-gen) and saw absolutely horrid scrolling performance. I fired up the CA tool, and saw numbers that were wel

Re: Design for custom tableviewcell button action

2009-06-30 Thread Brian Slick
One more question about this approach... On Jun 26, 2009, at 9:08 PM, mmalc Crawford wrote: In the cell's nib file: The class of the File's Owner should be your table view controller class. Set an identifier for the cell. Connect the appropriate outlet from File's Owner to t

Re: Design for custom tableviewcell button action

2009-06-26 Thread Brian Slick
On Jun 26, 2009, at 9:08 PM, mmalc Crawford wrote: if (cell == nil) { [[NSBundle mainBundle] loadNibNamed:@"<#Your nib file name#>" owner:self options:nil]; cell = <#cell outlet property#>; self.<#cell outlet property#> = nil;

Re: [iPhone] Any way to animate a tab-bar away?

2009-05-22 Thread Brian Slick
In the view you are animating in, perhaps in the -init method, you can do this: [self setHidesBottomBarWhenPushed: YES]; There may be a complication, since it looks like you would want to do this on the top-most view controller for that tab. I've only ever done it for subviews, so that th

Re: iPhone target-specific headers for Xcode

2009-05-07 Thread Brian Slick
See if either of these helps out: http://www.iphonedevsdk.com/forum/iphone-sdk-development/7515-how-do-i-define-preprocessor-macros-xcode-project-settings.html http://blog.aribraginsky.com/2009/01/how-do-i-define-preprocessor-macros-in.html Brian On May 7, 2009, at 11:32 AM, Sam Krishna wrote

Re: [iPhone] tab bar and navigation combined...

2009-05-05 Thread Brian Slick
I found this thread: http://www.iphonedevsdk.com/forum/iphone-sdk-development/2447-tab-bar-controller-navigation-controller-tableview.html ...to be very helpful when trying to accomplish the same thing. Brian On May 5, 2009, at 11:38 AM, James Lin wrote: Hi list, I have a iPhone program. T

Re: noob: Question about senders and views

2009-04-08 Thread Brian Slick
I won't claim to have the concepts down, but I'll try to answer to the best of my understanding. Hopefully someone else will correct any mistakes that I make. FirstViewController and SecondViewController don't know anything about each other, because one did not create the other. So in ord

Re: Dismissing the iPhone keyboard

2009-04-03 Thread Brian Slick
Do you have: @interface YourViewController : UIViewController ^ ...in your header file? Oh, just glanced at my own code, and I'm using this when the text field gets created: [textField addTarget:self action:@selector(tex

Re: How to know when a UISwitch is being touched

2009-04-01 Thread Brian Slick
or 0 otherwise. Hope that helps. Joan Lluch-Zorrilla El 01/04/2009, a las 16:03, Brian Slick escribió: We may be able to combine forces here. What I was doing gets the correct answer from the switch, but what I was finding is that certain circumstances do not result in a message being sent

Re: How to know when a UISwitch is being touched

2009-04-01 Thread Brian Slick
We may be able to combine forces here. What I was doing gets the correct answer from the switch, but what I was finding is that certain circumstances do not result in a message being sent from the switch. I forget just now which circumstance it was, but I believe it was a direct tap on th

Re: iPhone Tab bar Question

2009-03-24 Thread Brian Slick
On Mar 24, 2009, at 10:20 AM, Dave Camp wrote: On Mar 23, 2009, at 6:02 PM, Jason Todd Slack-Moehrle wrote: I created a standard iPhone application using the built-in wizard and it builds and runs fine. My question is how do I modify the tab bar at the bottom to not make space for an ima

Re: [iPhone] NumberPad with the dot

2009-03-17 Thread Brian Slick
In searching for a similar solution myself, I've come across three possibilities: 1) Roll your own keyboard, as others have mentioned. 2) Overlay a decimal button onto the keyboard, like this: http://billabonger.net/blog/2009/01/add-a-decimal-to-uitextfield-number-pad-keyboard/ * - I have no i

Re: Newbie Object Sharing Question

2009-01-31 Thread Brian Slick
On Jan 30, 2009, at 9:47 PM, Ken Thomases wrote: On Jan 30, 2009, at 2:46 PM, Brian Slick wrote: It starts to occur to me that I don't actually want an instance, I want the real deal. That statement is nonsensical. There is no "real deal". An instance is real. It&

Newbie Object Sharing Question

2009-01-30 Thread Brian Slick
I'm sure there is a really easy concept somewhere that I'm just not getting, but well I'm just not getting it. This is for the iPhone, but I believe it is generic to Cocoa. Let's say I'm making a task list program, and the primary UI is a UITabBar. On one tab, I want a table view presenti

Re: [NOOB] Finding Information (was: real noob question)

2009-01-19 Thread Brian Slick
On Jan 19, 2009, at 11:17 AM, mmalc Crawford wrote: On Jan 19, 2009, at 6:10 AM, julius wrote: But there is nothing here that looks anything like it would allow me to intialise with a numeric value like 23.30. It's not clear why, throughout, you have ignored: (a) initWithMantissa:expone