xcode

Why there is an invalid context error?

Here is the code I use to draw: - (void) drawSomething { CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetRGBStrokeColor(context, 1, 0, 0, 1); CGContextSetLineWidth(context, 6.0); CGContextMoveToPoint(context, 100.0f, 100.0f); CGContextAddLineToPoint(context, 200.0f, 200.0f); CGContextStrokePat...

How do I get the output of an Xcode user script to auto indent?

The Problem I want to press a key when I have a line highlighted and convert from a single line: JGLogEntry *logEntry = [JGLogEntry applicationNoWindowsFrom:date1 to:date2 intoMOC:mockRawMOC]; to a multiline statement: JGLogEntry *logEntry = [JGLogEntry applicationNoWindowsFrom:date1 ...

NSManagedObject get parent object

I have an NSManagedObject who has a one to many relationship with the parent Object. How can I get the parent object using the child object? ...

tabBarController popToRooTViewControler

Every time a user changes a tab, for the selected tab I want to push it to its top level controller. I have implemented the delegate method for the Tabbarcontroller like this: - (void) tabBarControler:(UITabBarController *)tabBarController didSelectViewController:(UIViewController*)viewController{ [[self navigationController] pop...

Change colour of standard progress bar using Quartz filters

I need 2 different colours: Yellow, Green. Is it smart to use Quartz filters on standard progress bar, because sometimes I can see rendering problems after doing so. ...

Make UILabel show "No results" instead of "nan"

I have a small app, where user can make some calculations and solve equations. For example, if in a square equation discriminant is less than zero, the x1 and x2 values are "nan", so when I assign x1 and x2 values to UILabels they show "nan" as well. Writing a lot of if's like if(D<0) [label setText:[NSString stringWithFormat: @"No solu...

xcode 3.2: how can i add an include dir to my project?

Hiya. I can't seem to find in Xcode how can I add an include dir to my project. how can I do so ? thanks! ...

Reading data from xml file

I have a currency converter application for iphone which uses web service. The web service is returning result in the following format:- <Date>4/5/2010</Date> <Time>7:18:09 AM</Time> <Amount>20</Amount> <ExchangeRate>44.7336419443466</ExchangeRate> <Result>894.672839</Result> ...

Modelview navigation problem

i have a navigation controller displaying as a modelview controller. That model view controller calling from another view controller. In that modelview controller im navigating to different controllers and its working fine. but when i return to that model view controller the navigfation is not smooth and i can see space between that con...

how to make the scroll view for iphone

HI May i know how to make the scroll view as mentioned in this following URL. http://developer.apple.com/IPhone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/TextandWeb/TextandWeb.html Thanks in advance!! ...

Install multiple iPhone apps at once from Xcode to device

Supposing we have an Xcode iPhone project with 2 targets, is it possible to build and install both of them on the device with one click? Of course, I understand we will not be able to "build and run" both, but can we at least install them? And to extend this concept a bit a bit: are there any scripts to achieve the same thing but with m...

Creating my own bundle in xCode, for iPhone application

Hello everyone! I am having some difficulty creating a bundle for my application, and placing files in the bundle. For example, Facebook has developed a bundle for iPhone applications using their framework. In the same way, I also want to create a bundle which can be reused for many applications. My questions are: what steps should ...

UITableView crashes when trying to scroll

Hi, I have a problem with data in UITableView. I have UIViewController, that contains UITableView outlet and few more things I am using and ... It works :) ... it works lovely, but ... I've created an RSS reader class that is using delegates to deploy the data to the table ... and once again, If I'll just create dummy data in the main ...

How do I make a UIAlertView happen only on the first start-up of an iPhone app?

I'm using the UIAlertView to make a pop-up happen once the app has started up. It works fine but I only want the pop up to happen on the first start-up of the app. At the moment I've got the UIAlertView in the AppDelegate class, after the application didFinishLaunching. Here is my code at the moment. - (BOOL)application:(UIApplication *...

How do I properly embed third-party frameworks in my Cocoa application?

I am writing a Cocoa application that makes use of the ParseKit framework (http://www.parsekit.com/). I've included the Framework in the proper folder, added a Copy Files build phase, and added it to the build phase. I can build and launch the application on my Mac. However, when I try to run it on another Mac, it crashes. The Console ...

Iphone SDK - tap to undo a zoom inside of a scroll view

Hi, I was just wondering how I can get a single tap to undo the zoom inside of a scroll view? I cant seem to figure it out. I was also wondering how do you know what size to set your scroll view contentSize, as I find this issue a little confusing at the moment I have it set at 460x320. Thanks ...

Xcode preferences across multiple computers?

I run Xcode on both my laptop and desktop. I'm constantly tweaking my setup with regards to key bindings. Rather than try to get both configurations identical by hand, is there any way to create the configuration on one computer and then share it via dropbox (for example) for the other to use? Perhaps by symlinking the laptop's config...

iPhone: Newbie memory management question

I am just getting started with cocoa. So please excuse the silly question, but I can't quite wrap my head around some aspects of memory management yet. In the interface of my class I am declaring an object as CEMyObjectclass *myObject;. I do not alloc or init the obect in the classe's init menthod. But I do have a method that calls myOb...

Changing color of alert views

How can I change the color of the alert view box from blue to black? Any one please help!! ...

Turning Separate iPad/iPhone Targets into Universal App

I, when I got my hands on the iPad SDK Beta, thought the universal binary would be to much work, so i opted for the separate targets. I realized halfway through making the iPad portion of my app, that making a universal application would be easy as pie. The issue is, I can't use Apple's option to convert my iPhone Target to Universal. Th...