objective-c

View Frame Size Height = 0

Hello, I`m getting 0 when I return this from my ViewController : NSLog(@"%i",self.view.frame.size.height); In Interface builder, the View it's managing is occupying the entire screen . Help ? ...

Use NSString as object name

Hi everyone, I am using the following array: NSMutableArray *buttonNames = [NSMutableArray arrayWithObjects:@"button1", @"button2", @"button3", nil]; I then want to loop through this array and create UIButtons with each array element as the object name, something like this: for(NSString *name in buttonNames) { UIButton name = [UI...

Staggering sqlite records with Objective C

An iphone app we are producing will potentially have a table with 100,000+ records (scaling wise) and I am concerned that loading all this data via a SELECT * command into an array, or an Object will either make the app very slow; or will leave me with memory issues later on. Obviously loading 100,000+ records into an array when the vie...

Memory leak when setting cell data in UITableView

When running my iPhone app code with memory leak tool it says that i have two memory leaks in this method. The first when calling cell.textLabel setText: and the second when calling cell.imageView setImage: I can't figure out what it's wrong, please can you help me? - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIn...

How to pragmatically create and load multiple views in a Cocoa Desktop Application?

I've been trying to create multiple custom views generating xibs and connecting controllers to them. i have tried things like [window AddSubView:view0] and [window setContentView:view0] but i still don't get the new view displayed. i think I'm doing it wrong since creating the xib file. what is the right way from creating the xib ...

MKMapView inside Tab Bar and Navigtion Controller hides Google branding

I just received the following message when submitting to the app store: In addition, the application displays images provided by Google Maps without the corresponding Google branding, we cannot post this version to the App Store I have a TabBar with a NavigationController inside. The Navigation Controller loads the map in ...

use calendar as date picker

I'd like to popup a calendar control (like the month view from the calendar provided by Apple), which can be used as date picker. I've already made some research, but I'm asking if I missed something out. There are several free available libraries: * Kal * GCCalendar * TapkuLibrary * iphonecal * iphone-gcal Also there is one comme...

Should an IBOutlet only be used for interface UI elements?

Basic question here about the structure of a basic iOS MVC app.. I know IBOutlets are used for accessing view elements such as buttons and labels and such and modifying or getting their values.. Is it normal though to use an IBOutlet to access another object in your app FROM a view?? For example.. @interface CustomView : UIView { ...

Memory Leak in Objective C Class iOS

Hi, I have searched high and low to try to resolve this memory leak, but I can't figure out how to make it go away. I have several classes that I use to connect to my sqlite dbase and pull information. When I run the app using performance tools, leaks, I keep finding that all of my classes leak memory. Below is the code that I have. ...

If two different Categories having same method, then which one will be invoked by Objective C runtime system ??

If two different Categories having same method, then which one will be invoked by objective C runtime system ?? for example: @interface ClassA (MathOps) -(void)CategoryMethod; @end @interface ClassA (MathOps1) -(void)CategoryMethod; @end @implementation ClassA(MathOps1) - (void) CategoryMethod{ NSLog(@"Inside Category Meth...

UIViewController rotating problem

Hi, I have a TabbarController with different ViewControllers. Some of these ViewControllers should autorotate and one ViewController should be presented only in PORTRAIT. I fill the Tabbar with the following procedure: ChartThemeViewController *chartViewController = [[ChartThemeViewController alloc] ...

NSMutableString appendString generates a SIGABRT

This makes no sense to me. Maybe someone here can explain why this happens. I've got an NSMutableString that I alloc at the top of my iPhone app, then append to later in the process. It results in a SIGABRT, which doesn't add up to me. Here's the code: Header File (simplified): @interface MyAppDelegate : NSObject <UIApplicationDele...

Declaring an objective-c inteface in two separate places

When you start a SplitViewController-based project for the iPad, it creates a DetailViewController. In DetailViewController.h, it declares the interface as normal: @interface DetailViewController : UIViewController <UIPopoverControllerDelegate, UISplitViewControllerDelegate> { UIPopoverController *popoverController; UIT...

How to port Android application to iOS platform?

I'm developing an Android application and I would really like to deploy it for the iPhone as well. However, I do not know Objective-C and I think it would take an annoyingly long time to figure that and the Apple framework out. Is there a recommended way to port an Android application to iOS? Would the best bet be to hire a freelancer?...

Xcode 3.2.4 Analyzer skipped this file?

Having just upgraded to iOS 4.1 (Xcode 3.2.4) I am getting warnings when using the static analyser that I don't think I was previously getting when using 3.2.3 Now the project compiles just fine, is this something that has changed or do I have something set wrong? NB: I have the build results window set to "All Messages" EDIT: I th...

UILables not updating properly in a UITableViewCell

Hi there, been having this problem for a few days now and can't seem to find a solution for it. It's probably some very basic stuff but still can't come up with a solution. I have a bunch of labels nested inside table view cells with an edit navigation controller button that goes to another table view. This table view has text fields t...

Leaks on componentsSeparatedByString and stringWithFormat, is there a better way to do this?

I'm getting a bunch of memory leaks for this bit of code in Instruments. Here: NSArray *tmpCoords = [loc.mapCoords componentsSeparatedByString:@","]; and Here: coords.tileRow = [NSString stringWithFormat:@"%d",x]; coords.tileCol = [NSString stringWithFormat:@"%d",y]; Is there a better way to do this? I'm basically parsing ...

Repetitive code in UITableView

Hello, I find myself writing a lot of repetitive code in UITableView, especially for config panels spending much more time on it that it seems worth. I was wondering if something like MonoTouch Dialog (http://tirania.org/blog/archive/2010/Feb-23.html) existed in Obj-C. Thanks! ...

How can I create an animated .gif from a movie?

How can I create an animated .gif file from a movie I have? I guess it is pretty simple in objective-C and cocoa, by using the QTKit, to extract images from a movie, now how can I glue them together as an animated gif? ...

Is it correct to initialise a UITableViewCell using initWithCoder?

I am loading a UITableViewCell using, [[NSBundle mainBundle] loadNibNamed:@"BlogCell" owner:self options:nil]; cell = blogCell; self.blogCell = nil; where blogCell is an outlet to BlogCell.xib The actual UITableViewCell is of type BlogCell which is a subclass of UITableViewCell. In my BlogCell class I am using -(id)initWithCoder:(...