iphone-sdk-4.0

UIImage full rotation using CABasicAnimation is not working in iOS 4.1

Hi, i'm rotating an image using CABasicAnimation but seems it's not working in iOS 4.1.I've got all the code working in iOS 3.1. Here's my code: CABasicAnimation *fullRotation; fullRotation = [CABasicAnimation animationWithKeyPath:@"transform.rotation"]; fullRotation.fromValue = [NSNumber numberWithFloat:0]; fullRotation...

Repeat sth every 10 seconds except NSTimer

how to repeat sth every 20 seconds ?(except NSTimer) ...

Get current time

How to get current time ?(hour:minute:second) ...

UIButton Event for Delete Row in UITableView

I add button in UITableView cell. My code is UIButton *btnView = [[UIButton buttonWithType:UIButtonTypeContactAdd] retain]; btnView.frame = CGRectMake(280.0, 8.0, 25.0, 25.0); //[btnView setImage:[UIImage imageNamed:@"invite.png"] forState:UIControlStateNormal]; [btnView addTarget:self action:@selector(action:) forControlEv...

Problem in xCode update

Hello all, I was working on Mac OS 10.5 n xCode 3.1.3 yesterday I updated my Mac OS with Leopard 10.6.4 n my xCode with 3.2 n 4.0 version. but Now i m not able to detect my older xCode versions 3.0 to 3.1.3, I need them also to run my older application on my iphone(2G). Please tell me the way to make it correct by answering here or by c...

Application not opening in 2.1.2 iPod touch

Hi, My application is working fine on iPhone 3.1.2 but when I am trying to open application in iPod Touch 2.1.2 then black screen appears only. Please provide me the solution. Thanks ...

iAd in iphone application "'ADBannerContentSizeIdentifier320x50' undeclared (first use in this function)"

Hello, I am using iAd in my iphone 4.0 application but after adding the ADBannerView on view and when i try to set the ADBannerView properties using below code :- adViewTemp.requiredContentSizes= [NSSet setWithObject:ADBannerContentSizeIdentifier320x50]; I get the below error message:- error: 'ADBannerContentSizeIdentifier320x...

Play Videos in MPMoviePlayerController from a URL ??

i am trying to play a video from a Url with help of MPMovieplayer which loads it in the Quicktime player while i want the video to play in my application only(no background mode)?? how can i achieve that?? will playing the video in a UIWebview instead of MPMoviePlayer work?? Also when QuickTime Player loads only Audio plays and no video ...

record in mp3 format in iphone sdk

Hello all, I am searching over this from last 2 days but still haven't find anything helpful for this. I want to record audio in mp3 format using core audio. Right now i'm recording in LinearPCM caf format. Does someone knows how to record in mp3 format or an alternative is to convert caf to mp3. Thanks ...

My App calls scrollViewDidScroll 19 times

I have an app based on Apple's PageControl sample. The first time the view loads, the scroll view is loaded with page 0 and page 1. Whenever a scroll is initiated, the scrollViewDidScroll method should get called by UIKit correct? When initiating a scroll from page 0 to page 1, the app should load page-1, page and page+1, (to prevent fl...

MPMoviePlayerViewController playing only audio no video on simulator??

i am using the following code to play a video from a url but when the video loads only audio is played and no video is shown on simulator..right now i cant test it on iphone 4.0 device...is there a problem with the simulator or is MPMoviePlayerViewController is not the right way?? NSString *videoFilepath = @"http://www.migital.com/Hema...

Switching Views from a AlertView Buttons

Application : It has 3 views Views A,B,C. There is a Alert on View B with 2 buttons on it. What I do is: I go from View A to View B. On B, I click on the Alert button to take me back on View A. Problem: When i click on the button to again go to View B then it gives an error related to "isValid" property of timer. Timer is declar...

Error : Duplicate symbol ...

I declare "int x" in view A and in view B but occur below error Why? Duplicate symbol -X in... ...

Problems running application compiled with XCode 3.2.4 and iOS SDK 4.1 on iOS 3.x

Hi, I recently ran into troubles building an app with latest iOS 4.1 SDK and running it on device with iOS 3.x. App works OK on 4.x devices and iPad, but crashes on devices running older 3.x iOS. Problem appears to be in linker, since crashes are obviously caused by calls to 3rd party libraries used in the project. The linker (or even ...

Persisting NSMUtablearray which is property of Core Data Entity

@interface Week : NSManagedObject { } @property (nonatomic, retain) NSNumber *weekID; @property (nonatomic, retain) NSString *top; @property (nonatomic, retain) NSString *summary1; @property (nonatomic, retain) NSMutableArray *book; @end I'm reading XML file from server and putting vales in above entity.Since Books to be read for th...

UIWebview Localization

On a localized Iphone (Language set to Hebrew) when we view a webpage using safari and tap on an input field we get the keyboard up with the "Next/Previous/Done" buttons in Hebrew. When we view the same webpage using a UIWebview embedded inside our application the "Next/Previous/Done" buttons are always in English. We were thinking th...

Detecting touches on a scrollview

Is it possible to detect the touches in a scrollview which is filled with a grid of buttons as in the image below? For example, in this image, i can only drag the scroll view by dragging on the red areas, but i would like to be able to scroll the scrollview no matter where it is touched (like the iPhone's home screen)? Thanks ...

Extract a range from NSArray

I need to display 6 views and each view should display 20 items (UIButtons). I have one big NSArray which contains the items for all 6 views. For example, view 1 should be items 0-19, view 2 should be items 20-39. How would i extract the relevant range out of the array? Maybe using NSRange with a length of 20, but the start location w...

playing video and audio using MPMoviePlayerContoller

Hi In my application I am using MPMoviePayerController class's object to play audio(.mp3) files as well as videos(.m4v) files directly from the server. Few lines of code:-- MPMoviePlayerController *moviewPlayer = [[MPMoviePlayerController alloc initWithContentURL:[NSURL URLWithString@"myURLGoesHere"]; moviePlayer.view.frame = self.view....

iphone 4 sdk : detect return from background mode

Hi, how one can detect that the app just return from "background mode"? I mean, I don't want my app to fetch data (each 60 sec) when the user press the "home button". But, I'd like to make some "special" update the first time the app is in foreground mode. How to detect this two events : app going to background mode (or "is this app ...