iphone

how to change position of image view in landscape mode

hi i am new to iphone. what i did is displaying grid of images,and a full image on image view. when ever i rotate the simulator to landscape left(or)right image view position is not changed. i need to change the postion and reduce the size of the image view in landscape mode how can i done this pls help me. post some code thank u . ...

How to stop NSTimer scheduledTimerWithTimeInterval Time) userInfo:nil

Hey so i am just making an example application and i am having a little trouble, So i have a table view and then i have a few rows and when a user clicks a row it takes them to a new view. On this view i have a button to play music. I am using a timer to make a slider bar increase based on music duration and remaining time. Now my probl...

iOS: How to make a secure HTTPS connection to pass credentials?

I am creating my first iPad app. I have a web application that I would like to authenticate against and pull data from in a RESTful way. If you open up the URL in the browser (https://myapp.com/auth/login), you will get a form to enter your username and password. I was thinking I could set the login credentials in the post data of the r...

Portrait to landscape Orientation change of UITabbar?

Hi, In my application, i have used UITabbarController inside UINavigationController, when you click main it will landed to detail with landscape, instead of that, i need to change the orientation of my app. how should i get it? Sri ...

iphone using cocos2d get EXC_BAD_ACCESS

I am making a simple game project involving the use of Cocos2d. Now as defined by Ray Wenderlich's example, i have completed the whole tutorial but added an extra bit of code myself to check total number of melons, when they reach 3, i replace screen with "You Win" screen to notify the user that he has won using [[CCDirector sharedDirect...

Sample code for iAd in iOS 4

I'm looking for code samples and tutorials for integrating iAd in iOS 4. What are some good resources for this? ...

JavaScript Broken in UIWebView's "Start Load" Callback

I'm trying to execute some JS before the page's onLoad event fires. But I'm having trouble successfully calling stringByEvaluatingJavaScriptFromString in the webViewDidStartLoad delegate method. To reproduce the issue, you can use the following code. Delegate implementation: -(void)webViewDidStartLoad:(UIWebView *)webView { [webV...

iPhone:How to get real ads showing in iAds banner in iPhone application?

Hi all, I have integrated iAds in my iOS 4.0 application developed using the following tutorial: http://www.raywenderlich.com/1371/how-to-integrate-iad-into-your-iphone-app Currently it is showing only Test Banner page. I would like to know how would i get real Ads showing there and what is the procedure to get it. I couldn't find any ...

2D object rotation for ipad

Hi guys I have drawn a 2D triangle on the my EAGLView using openGL coding. Now my requirement is like, user can rotate this triangle 360 degree by his finger's motion. My code is working pretty well but still not perfect. My triange is getting stucks for few pixels at some edges. Here is sample of my rotation code : GLfloat tot...

Iphone CGPDFDocument rendering incorrectly

I am creating a PDF Context and changing it to a UIImage to swipe through quickly. Currently some of the text is rendered strangely, seems to be all squashed together and ontop of each other line. The code I use is as follows: - (UIImage*)loadImageFromBundle:(NSString*)URL { CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(...

flipping UIViews ???

i am using the following code to flip between two UIViews.. - (IBAction)switchView:(id)sender { UIView *mainView =View1.view; UIView *flipsideView =View2.view; [UIView beginAnimations:@"View" context:nil]; [UIView setAnimationDuration:1.00]; [UIView setAnimationTransition: UIViewAnimationTransitionCurlUp forView:self.view cache:YES...

Xcode says: "No memory available to program now: unsafe to call malloc"

I am working on an opengl application and implementing a bezier surface in the iPhone and I am getting this: Data Formatters temporarily unavailable, will re-try after a 'continue'. (Not safe to call dlopen at this time.) No memory available to program now: unsafe to call malloc and sometimes I get malloc_error_break free...

how to access randon items from an array in i phone sdk

i want to know how to aceess random items from array in iphone sdk? i have made an music player in which next song comes from array on button click but i want to get the songs randomly ...

MapKit not working on device but works in simulator

I have added the frameworks (MapKit and CoreLocation) by selecting the Frameworks folder, right clicking, Add > Existing Frameworks. The app builds in the Simulator (3.1.3) but fails on the Device (3.1.3) with the error: ld: warning: in /Development/Sites/iPhone Projects/SwitchViews/MapKit.framework/MapKit, file is not of re...

My "drawView" function is being called only once?

Hello, I'm new to OpenGL ES and having a simple kind of problem in my project. I've successfully drawn a square on my screen but the problem is that my "drawView" function in my EAGLView is only called once however I wrote code to call it again n again as in Xcode's OpenGL ES Template. Do anyone have clue where's the mistake? Followin...

Example code for linking an iPhone app to the Address Book (using UnknownPersonViewController)

We are wanting to implement the UnknownPersonViewController. Want to achieve the following: Make a new person object. Set a few values for the person that we know already (First Name, Last Name, Email etc) wire the person the the view controllers displayedPerson Push the UnknownPersonViewController Interact with it Save the relevant ...

Does Value Changed event work for Text Fields at all in Interface Builder?

Hi, I'm trying to set up methods to be executed when value of certain text field is changed and saved. I tried to hook up this method with Value Changed event in Iterface Builder. It doesn't respond and I use this same event with some other control/classes and it works. There is also no delegate method usable for that purpose. Last re...

How to load a nib from a customized UIView?

I have a nib call "Hello.xib", and I have a HelloView that is inherit from the UIView, and I want to do the layout in the Hello.xib, and I want to allocate them to the HelloView.m / HelloView.h, how can I do so? Thank you. ...

drop down lists in xcode

Ive got a button in a UICell. I want a list(a table view like view to be precise) to dropdown when the user touches the button and dissappear when he touches it again.Googling didnt get me any solutions:-( Any suggestions on sites to refer would also be appreciated.. ...

how to show the tabbar when keyboard appears in iphone

hello all i am working in a tabbar based application where i need to show a keyboard , the keyboard appearing generally but I want my tabbar should be shown and on above of the tabbar only the keyboard should shown how this can be done.. thank you all ...