iphone

iphone SDK: Not sure why I am not receiving UITextField events?

I have defined the controller to receive the events. @interface salesViewController : UIViewController <UITextFieldDelegate>{ However, none of my events are not firing. - (void)textFieldDidBeginEditing:(UITextField *)textField { //this is not getting called } In Interface Builder I assigned the TextField delegate to the s...

Is there something special to consider when starting Shark in Snow Leopard?

After upgrade to Snow Leopard and downloading the new Xcode along with all new developer tools, Shark does not start. I launch it but it never appears. Is this a known issue? Is there a solution to get it running? ...

Is there a Quick Guide on how to use Shark with iPhone to measure performance?

I set it to iPhone/Network mode, but the device never appears anywhere. Connected and running an app through xcode. Do you know a useful tutorial for this? ...

Why is "Run > Run with Performance Tool > Shark" always gray in Xcode? How to call that?

There's this Shark entry in my run menu. But it's always inactive. What's wrong? New xcode with Snow Leopard. Installed all developer tools including CHUD from scratch. Shark itself runs but sees no devices, even though xcode does. it builds and runs on the device. no issues. ...

Getting thread id of current method call

Is there a way to print out the current thread id on which the current method is executing on? (objective-c please) ...

How can I store UIButtons in an array?

I have a method tied to four buttons. I want to create an array containing each button, and later retrieve and interact w/ a button from the array. The code I was tinkering with below. When I try to get a button from the array and send it a message, it goes kablooie. Any thoughts on what I'm doing wrong? Hack_DumpViewController.h ...

Problem in sdk 3.1 for MPMoviePlayer?

I have implemented playing video in mpmovie player controller.Its working in iphone(3.0) fine.But in 3.1 there is not playing application is terminate. ...

UITextView setText breaking hasText

So here's my code: [self.thing setText:[NSString stringWithFormat:@"Dear %@, ", name]]; For some reason, this leaves some kind of junk data in there that causes hasText to return true even if I delete everything in the textview. Ideas? ...

Tabcontroller problem?

Hi, How can i rotate tabbarcontroller in landscape mode when i am having XIB file(tab bar controller) in portait.i wrote the follwing in appdelegate (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return YES; } , but it wont be rotated any help please? ...

Check whether image exists on remote URL - iphone SDK3.0

Hi All, In my iPhone I need to show a number of images from remote URL. Some of the URL may download some amount of data and but it may not contain actual image data. So what I need to do to check whether the downloaded data is an image data or not? Thnx in advance, Syam S ...

Trying to add some external code into project gives error

Hi to all, In my project I want to add Speak Here code which is a sample code given on developer.apple.com site. It contain some .cpp & openGLES code and files. t gives me syntax error. I tried to solve this problem by renaming the .cpp file to .mm still it have the same problem. My project is window based application in XCode by using ...

How can I get an OpenGl texture of a polygon shape from an image?

I have an image and a convex polygon defined by an array of x,y coordinates. How would I go about getting a Texture2D representation of the part of the image encompassed by the polygon? Basically I just need a texture from the image with the part outside the polygon made transparent. If the resultant texture were also clipped to the...

UIViewController loadView method

when overriding the loadView method in UIViewController, should one call [super loadView] in the beginning of the method or at the end of the method? And why? ...

How to add a custom background to UISearchDisplayController's table view?

I want to add a custom UIImageView to UISearchDisplayController's table view background and set table view's background color to clearColor. Tried a few different approach but couldn't find the right solution. Any idea how to approach this? Note: I don't want to add to searchDisplayController's searchResultsTableView's view hierarchy,...

Need tableview grouped backgound in UIView?

hi, i have Tableview as XIB file,in that inspector i set style as grouped.so the BackGround will be in one format(vertical white lines and light blue) behind the cell. i want to bring in My UIView.How?there is no style component to set it.how can i do it? any help please? ...

want to "avoid" amimation effects of UIView subclass

I want to create "rounded" "semi-transparent" UIView (or anything does similar) my code below results in animation effects, gradually change transparent density. What I want is to avoid this effects and draw the resulting image straight from the beginning. Can anyone know how to do? Thank you. - (id)initWithFrame:(CGRect)frame { ...

how to hide when i push from navigation controller?

how to hide top bar in UIViewcontroller when i push from navigation controller using pushViewController ? any help please? ...

Why does Shark not list my iPod touch in the devices list?

In this answer Brian explained how to connect Shark with the device. I do it exactly this way, but Shark never lists my device. Even if Xcode launches my app on it and the app runs. I get console Logs and everything. It communicates with the mac. But Shark doesn't see it. What could cause this? Snow Leopard, btw... ...

Non repeating Random Numbers.

Im using. for (int i = 1, i<100, i++) int i = arc4random() % array count; But im getting repeats everytime so how can i full out the chosen int value from the range so when the program loops i will not get any dupe? Thanks. ...

when i preess home button there are so many icons are there .i have one icon of my application.how to set image on that icon

when i preess home button there are so many icons are there .i have one icon of my application.how to set image on that icon ...