For some reason, every time I run my Iphone App, the App works fine as long as it is upright. The second the simulator turns to the left or right (like if I manually turn it, or if it's trying to play a video), the code crashes, with either a "Bad Access" or an exception.
The crazy thing is that this stuff was JUST working, and I didn't...
- (void) hideMenu {
UIView *currentView = [self view];
[UIView beginAnimations:nil context: nil];
[UIView setAnimationDuration: 0.5];
[currentView setFrame:CGRectMake(0, 480, [currentView bounds].size.width, [currentView bounds].size.height)];
[UIView commitAnimations];
self.timer = [NSTimer scheduledTimerWithTimeInterval:(....
I'm switching views in the context of a navigation view heirarchy, and I want to be able to determine at switch time what the prior view was that is being pushed under the new view.
I'm trying this in a UINavigationControllerDelegate:
(void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIVi...
For working with time interval calculations on iPhone and looking at some component values.
#define kSecondsInYear 31556926
#define kSecondsInMonth 2629744
#define kSecondsInDay 86400
#define kSecondsInHour 3600
#define kSecondsInMinute 60
I got these from Google's conversion function. I rounded Seconds in Month to nearest int.
...
Hi All,
I am developing a game in cocos2d in which I have to connect my iphone game with face-book.
for that I have code
FBLoginButton *button=[[[FBLoginButton alloc]init] autorelease];
[[[Director sharedDirector]openGLView] addSubview :button] ;
when I click on button face-book login page is display. when I click on Username t...
It's well known that UIImagePickerController doesn't return the metadata of the photo after selection. However, a couple of apps in the app store (Mobile Fotos, PixelPipe) seem to be able to read the original files and the EXIF data stored within them, enabling the app to extract the geodata from the selected photo.
They seem to do this...
is my UIViewController freed when i call another controller ?
How to release memory of controller when i push to another controller ? i take more than 40Mo and application leave because of LOW MEMORY(No leak).
[self.navigationController pushViewController:[[MainListController alloc] init:self] animated:NO];
@interface MainListControlle...
I am tracking a touch sequence on a view. The view is in an hierarchy of 3 other views, and nothing is covering it.
When touches begin, until touches moved, I get an delay of 0.2 seconds. all following touchesMoved have a small delay of only 0.01 seconds.
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
lastTime =...
Hi,
Is there a way for my app to call a certain number and to play a certain sound?
Thanks.
...
I want to animate a view on top of another view in my iphone app. I basically want my view to look like the apple keyboard except with my custom controls. When i click a button I want the new view to animate up, from the bottom of the screen, on top of part of the view.
How would I do this?
...
Problably you know that iPhone OS makes an artifical delay of about 0.25 seconds after an touchesBegan: occures. This is to check if the user intends to move or not. If the deltas move significantly enough during this time, a touchesMoved: sequence starts.
But when you want to implement tactile touch behaviour in your app, you may not w...
Hi,
How can I do the following things with iPhone sdk:
1. Access built in microphone, get amplitude of a sound.
2. Record sound from microphone into a file.
3. Playback the audio recorded from the microphone.
Thank you in advance.
...
Hi there!
I would like to localize my app but I can't figure how to change text in copy and paste and other other buttons. I tried to google but that is way too much irrelevant info about iphone copy/paste :/
any help is greatly appreciated
...
Hi,
What is the difference between peakPowerForChannel and averagePowerForChannel methods of AVAudioRecorder?
And why is the value returned is negative? Isn't it supposed to be 0 for no sound and go up when the amplitude of sound rises? How can I convert to a more "readable" format?
Thanks.
...
imgBiteSpot.clipsToBounds=YES;
NSData *imageData = [[[NSData alloc]init]autorelease];
imageData = [NSData dataWithContentsOfURL:[NSURL URLWithString:ObjBitSpot.StrImagePath]];
if(imageData==0)
{
imgBiteSpot.image=[UIImage imageNamed:@"img-not-found.gif"];
}
else {
UIImage *imgs = [[UIImage alloc] initWi...
Hi,
I have extended both NSString and NSMutableString with some convenience methods using categories. These added methods have the same name, but have different implementations. For e.g., I have implemented the ruby "strip" function that removes space characters at the endpoints for both but for NSString it returns a new string, and fo...
I have an instance of a class "A" in my EAGLView class, it gets instantiated in the EAGLView's initWithCoder method.
This class "A" contains an IBOutlet to a UIView.
I also have an instance of this class "A" in the Interface Builder, to connect the class "A" IBOutlet to the corresponding view.
So the class "A" is being instanciated t...
So NSXMLParser has problems parsing strings using the Windows-1252 encoder. Now I did find a solution on this page to convert it to NSUTF8StringEncoding. But now it bumps into characters it can't parse.
So I figured out that it will work if I would escape special characters and then transfer it back after parsing it. For example:
strin...
Hi,
I want to create a camera application.
What are the available ways to share photos that were taken from my app? Email a photo? Send it via bluetooth? Probably a user can upload it to his computer?
How can I implement them?
Thanks.
...
Hello,
I'm writing an application that uses UIImagePickerController. I'd like to give users choice of source of pictures, either take a new photo or choose from existing ones. I'd like to create exactly the same selection interface as is in twitterfon or in safari when you hold tap on the link. It looks like some standard SDK thing but ...