xcode

Inconsistent Frame / Bounds of UIImage and UIScrollView

this one puzzles me. I have an Image with a width of 1600 pixels and height of 1819 pixels. I load the image as UIImageView into an UIScrollView and set the "contentsize parameter" iKarteScrollView.contentSize = CGSizeMake(iKarteImageView.bounds.size.width, iKarteImageView.bounds.size.height); NSLog(@"Frame - width %.6f, height %.6f - ...

CoreData - should I pass an existing NSNumber to set the attribute of an entity, or create a new one ?

Hello, I'm starting with CoreData and I have a question : I have an array with NSNumber objects in it. I need to create an entity Event for each object with only one attribute eventNumber which should also be an NSNumber. Can I pass the object of my array like this : for (int i = 0, i<[myArray count], i++){ Event *newEvent = [NSEnt...

Xcode Instruments. What is the meaing of Virtual Memory? iPhone OS has no VM?

Hello, I've been staring at the Memory Monitor in Instruments and I am scratching my had. Why is it displaying virtual memory? iPhone OS has no virtual memory. What does it mean? My concern is that I am getting memory warnings for my iPad app but the apps real memory never exceeds 70MB and the virtual memory never exceeds 180MB? Could...

move sprite by using touchmoved in specified regions of screen

hi friends, I am making an application, in that I want to move the sprite in a specified region of the screen, With cocos2d I am not able to make move of sprite, I only know the method -(void)ccTouchMoved:(UITouch *)touches withEvent:(UIEvent *)event, but I don't know how to move a sprite, can any one help me???? Thanks in advance ...

How does XCode signal an app to stop while running in the simulator

In the typical build and run sequence of XCode, you often have your app still running in the iPhone simulator from the last time. XCode helpfully asks if you would like to stop the executable before it installs and runs the newest build. But how does XCode signal the iPhone simulator to stop the application? And could I write a step i...

How do I properly add existing source code files to my Xcode project?

I'm new to iPhone development and I'm still getting familiar with the Mac dev environment, including Xcode. I want to add some 3rd party code to my iPhone project, but when I add the "existing files" to my Xcode project, I'm presented with a dialog box that has far too many options that I don't understand and, as such, my project isn't ...

presentModalViewController does not want to work when called from a protocol method

I have a subview that when double tapped a protocol method on the subview's parent view controller is called like this... - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *theTouch = [touches anyObject]; if (theTouch.tapCount == 1) { } else if (theTouch.tapCount == 2) { if ([self.delegate respondsT...

How do I properly add the Kal framework to my iPhone project?

I'm new to iPhone development and I'm having trouble using the 3rd part Kal framework in my project. I can't find any documentation on how to add the Kal framework to my code, so I assumed it was just a matter of adding the source files to my project's "Groups and Files" and set the Header file search path to include the new code. I...

Creating a post-build step in Xcode 3.2

I'm actually looking for a genuine "post build" phase - not the Run script stage. The reason for this is that I want to do some parsing of a target's build-state.dat which is where Xcode puts all of its build output. The problem is that this file isn't actually created until after the build has succeeded or failed, thus anything in the...

xcode UIWebView - Text Fields = No on screen keyboard.

This application is used to let you use our company basecamp site and only that site. When logged in, if you go to post a new message, you can insert text in the title text field, but if you try to tap in the message body section, it does not bring up the keyboard. I have to assume it's something with my coding, because safari works just...

IPhone library project + UIViews

I'm trying to refactor some of my iphone code into a library project that can be linked to by several different applications. I made a new iphone library project and copied over some of my classes there, but the project can't build because it doesn't know about stuff like UIView or CGRect. I added in the UIKit, CoreGraphics, and Quartz...

Unsuccessful error detection of improperly declared method in GCC 4.2 compiler

I am using C++ compiler GCC 4.2 in XCode 3.2.2. I have noted that the compiler will successfully compile a method foo even though there are no ellipses. The header and method are properly declared as foo(), but when I do a find and replace either by file or by program-wide it will miss approximately 2-3% of the changes [foo to foo(). ...

What is the correct way to add a subview to a new window, making it aware of its available window size?

Hi, This is some kind of a basic question: I am adding a new Subview to a window using: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { viewController = [[myViewController alloc] initWithNibName:@"myNib" bundle:nil]; [window addSubview:viewController.view]; This ...

xcode - ipad app. UIWebView Remember login info

I'm working on an application to run base camps website only. I need it to work when you login and press "Remember me on this computer" I'm not sure how to set it up to actually remember your login and keep you logged in when you come back to the app. Is there a way to 'save' the state of the application when you quite it and come bac...

UISwitch text not showing on device

Hi, I have a screen with several UISwitch controls. On my iPhone simulator this screen works correctly and The Switch text shows as On/Off. Different on my testing device (iPod Touch). Here the text seems to get lost and I only get "1" (instead of "On") and "0" (instead of "Off"). I don't know where the iPod Touch is different and w...

Why this kind of release doesn't work?

Hello, I have a newbie question about the following: - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { NSArray *anArray; anArray = [dictionary objectForKey: [NSString stringWithFormat:@"%d", section]]; //here dictionary is of type NSDictionary, initialized in another place. An...

How do i add functionality to an iPhone application?

There is an application available for jailbroken iPhones called YourTube which adds extra functionality to the stock YouTube application. Info here: http://forums.macrumors.com/showthread.php?t=754439 My question is... how is this possible and how could I do something similar? ...

How to stop huge Prefix.pch.gch file from being copied into application bundle

For some reason, XCode has decided to start copying a huge Prefix.pch.gch file into my application's resources folder when building. This file is not in the Copy Bundle Resources build phase, nor can I find any other project setting that should tell XCode to do this. Has anyone seen this before and know what's going on? ...

How to define colors in XCodes' Interface Builder?

Hi, I would like to copy colors between elements in the interface builder or define them using RGB values. I.e. copy the background color of a button to another button without duplicating the button. Or: Enter an exact RGB code using the interface builder. Currently I can do this only programmatically but the interface builder is mea...

Encoding Video on the iPhone

Im trying to record the contents of the iPhone screen to video , in the app I'm working I want the user to be able to create a little animation but I'm just not sure how to encode the screen contents/animation to video when their finished? The problem with using something like ffmpeg is that its LGPL which can lead to licensing issues, ...