xcode

Iphone: Passing objects and Multiple threads

Hi, Im having some trouble passing an NSNumber object to different threads. I call a function on viewDidload that loads up some objects from core data as a background process. which calls another function which loops through the loaded objects to see if there are any images associated with it alredy downloaded. if its not present, downlo...

iPhone, how do I center button.titleLabel text ?

I change the text of one of my buttons, I didn't realize that the text wasn't centered. Its set in IB How do I center it ? ...

Buffere write becomes slow after CGBitmapContextCreate

I have code something like this... CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); CGContextRef ctx = CGBitmapContextCreate(pixelArray, width, height, 8, 4 * width, colorSpace, kCGImageAlphaNoneSkipLast); CGImageRef createdImage = CGBitmapContextCreateImage (ctx); uiImage = [[UIImage imageWithCGImage:createdImage] retain];...

Adding a UIView below the screen

I have a UIViewController added using addSubview hanging out on top of another UIViewController. I would like the added view to hang out below the screen to be called up with a nice animation when I need it. Is there a way to add a subview to a screen at a certain location? ...

distorted UIView view on load

I have a UIScrollView that contains a UIView onto which I am drawing a rather complex graphic using CGPaths. After the view finishes loading the graphic is distorted in that it is elongated horizontally and vertically. If I redraw it, it looks normal. Any ideas on what is causing this and how to fix it? ...

Processid (PID) reuse problem with xCode

I have a large custom CMS and I use xcode to run a profiler to get debug information. So, I perform different functions in my CMS and "HOPE" to get ALL information via xDebug. Lets say I perform two functions: 1. Load a listing of users 2. Deleted a user 2.1 Calls an AJAX script to delete user. Now, due to the process id reuse...

iPhone, where should I put my control populate pushed view, viewDidLoad called once ?

I've got a UITableView with some records shown, once a row is selected another screen appears allowing the user to edit the record. They then click Done or Cancel on the navigation bar and return to the UITableView screen. Heres my code in the didSelectRowAtIndexPath if (self.transactionDetailViewController == nil ) { TransactionD...

XCode - touchBegan - Recent Touches/New Touches

Hey all, I have been using touches began to track as many as 8 touches, and each triggers an event. These touches can occur at the same time, or staggered. - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { NSLog(@"Touch Began"); NSSet *allTouches = [event allTouches]; for (int i=0; i<allTouches.count; i++)...

Can't complie Three20 template on iOS4

I pulled the latest version of three20 from github, and installed their template. I opened it up in XCode, build and run, then I realize the template isn't iOS4 ready. The first issue I found was "Base SDK not found", I solve it Edit Project Setting , changed the Base SDK to "iOS Device 4.1" Then I run it again, I got tons of errors r...

Connect a UILabel in Interface Builder and XCode?

I am trying to do something as simple as add a Label to a View in XCode and IB and I can't figure out how to do it. All the samples I find online are for older versions of IB so the directions aren't correct. I have a label on my .xib file, in my Controller.h file I have an IBOutlet UILabel declared with a Property set up. In my Contr...

What does a C function named "Sleep" do on a Mac

Note the capital S on sleep. Note, Sleep with a capital S is a standard function that sleeps milliseconds on the PC. On the mac, under OSX, there is no such symbol. But the xcode+linking environment seems to find something to link it to ...and I'm betting I won't like the answer. ...

Weird Compilation Error on Xcode

Simple problem... I had some comments on my code and deleted them and got an error. After some hours I arrived at the source. This code works: switch (indexPath.row) { case 0: NSLog(@"case 0"); break; case 1: // Clients NSLog(@"case 1"); ViewClientListTableController *viewListTableController = [...

How do runtime-created sub views communicate with the view controller?

Hi In my iPhone project I have a UIViewController in which I add an instance of a subclass of UIView. From this instance I need to communicate back an integer to my view controller. My current solution is to send a message from my instance to my App Delegate which sends a message to the view controller. It works, but it feels a bit mess...

UIButton as UINavigationbar button

I have a Tab bar application. and in one of the tab bars I have a navigation contorller. Im trying to set a UIButton with an image as the right button the navigation bar. UIButton *refreshButton = [[UIButton alloc] init]; [refreshButton setImage:[UIImage imageNamed:@"refresh_icon.png"] forState:UIControlStateNormal]; [refres...

How do I concat a string + int and match it to an item in an NSArray?

Heres my Array. NSArray *arrayData = [[NSArray alloc] initWithObjects:@"1 days", @"7 days", @"14 days", @"28 days", @"1 months", @"2 months", @"3 months", @"4 months", @"6 months", @"1 years", @"2 years", @"once", nil]; Heres my NSString and my integer. int interval = 2; NSString *itype = @"years"; I need to join b...

Distribution Profile Xcode 3.2.4 how?

I am a little confused about where to get (or create) a distribution profile to submit my application to the iTunes Store. Previously I did this via the menu items from within the iPhone Developer Program > iTunes Connect, however now I can't see that option. Inside Xcode > Edit Project Settings > Code Signing > Any iOS Device I can sel...

iPhone, how do I determine when a child screen passes back to a UITableView and how do I update that row?

I asked a question the other day about how rows are added to a UITableView after the table is shown and I was told that the datasource should be updated and insertIndexPaths:withRowAnimation should be called. My UITable view contains rows of data, when the row is clicked another screen is shown which allows the user to edit the data, on...

UISwipeGestureRecognizer gesture start point.

Is it possible to get a gesture start point from a UISwipeGestureRecognizer. like how its possible in - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch * touch = [touches anyObject]; gestureStartPoint = [touch locationInView:self]; } ...

loading and manipulating a multi component UIPicker with Plist

In detail code, can someone please show me a way to populate a multiple component UIPicker with data from a plist? The reason I choose Plist as my datasource mainly is because it is much easier to manage visually and edit at the later stage. I want to create a simple app that have Picker with 4 components (lets call it component A, B,...

Volume Control for entire app

My current app could probably be thought of as a sound board. There are a few buttons to click on which produce sounds. The sound are on on View Controller. Nested inside that is another View Controller with the settings which will pop up when called. This is where I need to put my volume slider. To produce the sounds the parent View...