iphone

#pragma mark text field delegates

what is this #pragma mark text field delegates? It is like a comment? or what is this used for? ...

Core data Relation Fault (not lazy loading) problem. Relations dissaper

Hello Everyone, I have a core data database which has (for now) 2 entities Product and CompetingProduct, CompetingProduct relation is set to-many with products. I create 2 mock Products and 2 mock Competing products and set relation between them .. everything works files.. Saved to database, also NSlog, "po" them.. all is good. Now.. ...

How do I type using my keyboard on the iphone simulator?

I used to be able to type with my real mac keyboard after launching the iPhone Simulator. Typing with the on-screen simulator keyboard is just horrible when testing with large amounts of text. No matter what I do, I can't get my keyboard to type anymore inside the simulator. Even if I have "Simulate Hardware Keyboard" switched ON, it ju...

Applying for an iphone developer certificate from scratch?

Hello nice persons, Just got the iphone 4 and am eager to run my 'personally built' apps on it. Have looked everywhere on the apple website, but can't see where you 'sign up for a developer certificate'. Can someone explain to me how to do this, in baby steps? ...

Why can't I set the InputView property of my UITextView on iPhone?

I am trying to replace the Standard Keyboard on the iPhone with a custom one which I have created in MainKeyboard.xib, which is linked to the UIView outlet mainKeyboard. I have the following code that executes when the main view loads, and I have also tried triggering it with a UIButton for testing purposes. [[NSBundle mainBundle] loadN...

Core data issue

I am starting with iphone development and am facing an issue with core data. I have a model gathering several entities such as employee, project, project type, etc. On startup, I create several entities that I persist through the core data framework. No problem. The issue raises when I want to display a list of projects basing on a tab...

encrypt a file on iphone-sdk

Hello, I'd like to have a file encryption functionality for my iphone application. For desktop based applications i used the function below to encrypt relatively small files: - (NSData *)aesEncrypt:(NSString *)key { // 'key' should be 32 bytes for AES256, will be null-padded otherwise char keyPtr[kCCKeySizeAES256+1]; // room for term...

UItableViewCell - don't allow to select the cell, but can still press buttons inside it?

Hi there Can you add a button as a subview to a uitableview cell and have that clickable, but not the cell itself. ie: I don't want the selected view to come up. Obvs I can just not have the cell disclose anywhere, but I don't want it to look "selected" when someone taps it. Setting user interaction enabled to NO makes the whole thing ...

regexkitlite match ?

Hi, i would like to get everything inbetween &v= and "> using a regex expression, NSString *YouTubeRegex = @"/amp;v=([^(\">)]+)/"; But that regex is not returning any matches ? i know the coding is correct just not the regex expression any help ? Thanks ...

UIScrollView: content offset calculation after zoom

Hi All, Could somebody advice which formula used to content offset calculation after zoom in UIScrollView? Let's consider following example: I have a UIScrollView with content view in size (1000, 1000), then if I programmatically setZoomScale to 2.0 and in scrollViewDidEndZooming:withView:atScale method I will have the following: conte...

Xcode - Equivalent to Actionscript 3 event listener

Is there a similar method in xcode to the AS3 "AddEventListener" code? I want to be able to watch for a certain thing to happen, but not use up too much memory. Basically I have 8 buttons. Obviously I can't just go through a for loop to see if a touch is on them, I need an event or a trigger or something. (The reason I don't just use ...

iPhone game 2d shadows

Hi all! We're in the process of creating an iPhone game using cocos2d. We're trying to layer several sprites on top of each other and have them cast shadows. Right now the shadows are rendered as sprites which works fine for the most part. But we only want the shadows to hit the closest layer. I've made an image that hopefully explain...

AVCaptureSession returning blank image on iPhone 3G only

Hey guys, I'm using Apple's example code for AVCaptureSession, and the UIImage that gets created is completely blank. This only happens on the iPhone 3G, along with a unique error that shows up on console that says - Error: CGDataProviderCreateWithCopyOfData: vm_copy failed: status 2. I've researched the error online and found this St...

frame size and coordinates off (objective-c, ipad)

Supposedly this is a 10 by 10 square 100 pixels on the x axis from the origin and 100 pixels on the y axis from the origin (origin being the top left corner) However it quite clearly wrong. Writing the views frame to NSLog after setting it gives out the same values I put in. Code: ISScrollDock *bottomSV = [[ISScrollDock alloc] init];...

ViewDidAppear/ViewWillAppear not being called

I have a ViewController that adds to other subviews which have subclassed uiviewControllers so Its like this: mainViewController | v---------v subVC1 subVC2 And neither subVC1 or subVC2 have the viewDidAppear/viewWillAppear fired on them? The main view controller is creating in the app delegate and it view added there as w...

Change uitextfield background color to grey iphone sdk

I use [txtfld setBackgroundColor:[UIColor greyColor]] but the compiler sais may not respond and crashes not working! How can i make the background color grey? ...

Tutorial Books for Learning openGl and openGl in the iphone Platform

Hello helpful people of the internet, I've been programming for only a couple of years and have a basic grasp of trigonometry and other maths relevant to graphics. I really like learning using books that are tutorial in nature, especially those put out by APress and Big Nerd Ranch (iphone programming). I'm looking to learn the basics ...

resize and crop image centered

Hi, so currently i'm trying to crop and resize a picture to fit it into a specific size without loosing the ratio. a small image to show what i mean: i played a bit with vocaro's categories but they don't work with png's and have problems with gifs. also the image doesn't get cropped. does anyone have a suggestion how to do this re...

_dyld_start causing leaks in iphone apps

Using the Allocations Instrument on my Iphone Device, I notice in my heapshots that all my heap growth is caused by the _dyld_start caller (of dyld library). Here is an example: Snapshot: UIImageView Heap Growth: 4.83 Kb Still Alive: 103 When I look in the details, all I see is several instances of the following: Object Add: xxxx C...

iphone Core Data - What type of proprty for a float?

what type should my property be to work properly with core data float variables. For example in order to get my class to work with int32 in core data i had to create NSNumber in my class. how about the float variables in core data? ...