Search Results

Search found 23 results on 1 pages for 'isharreth'.

Page 1/1 | 1 

  • Stopping network activity indicator.

    - by iSharreth
    I used the below code to load a webpage. Everything works fine, but I want to stop the network activity indicator after completing loading the webpage. How can we know that the webpage is loaded completely. Anyone please help. UIApplication* app = [UIApplication sharedApplication]; app.networkActivityIndicatorVisible = YES; // to stop it, set this to NO NSURL *url = [NSURL URLWithString:@"http://www.google.com"]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; [webView loadRequest:request];

    Read the article

  • Delay in playing sounds using AVAudioPlayer

    - by iSharreth
    -(IBAction)playSound{ AVAudioPlayer *myExampleSound; NSString *myExamplePath = [[NSBundle mainBundle] pathForResource:@"myaudiofile" ofType:@"caf"]; myExampleSound =[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:myExamplePath] error:NULL]; myExampleSound.delegate = self; [myExampleSound play]; } I want to play a beep sound when a button is clicked. I had used the above code. But it is taking some delay in playing the sound. Anyone please help.

    Read the article

  • Changing color of the titlebar, background and text of MFMailComposeViewController

    - by iSharreth
    I am sending email from my iPhone application. Everything working fine, but I want to change the color of the title bar that appears from blue to black and the background color from white to black. Also, all the text to white color. What should I do? Anyone please help! I used the below code: (IBAction)sendMail{ MFMailComposeViewController *mailComposer = [[MFMailComposeViewController alloc]init]; mailComposer.mailComposeDelegate = self; if([MFMailComposeViewController canSendMail]){ [mailComposer setToRecipients: [NSArray arrayWithObjects:@"[email protected]",nil]]; [mailComposer setSubject: nil]; [mailComposer setMessageBody: nil isHTML:NO]; [self presentModalViewController:mailComposer animated: YES]; }

    Read the article

  • Delay in playing a beep sound

    - by iSharreth
    -(IBAction)playSound{ AVAudioPlayer *myExampleSound; NSString *myExamplePath = [[NSBundle mainBundle] pathForResource:@"myaudiofile" ofType:@"caf"]; myExampleSound =[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:myExamplePath] error:NULL]; myExampleSound.delegate = self; [myExampleSound play]; } I want to play a beep sound when a button is clicked. I had used the above code. But it is taking some delay in playing the sound. Anyone please help.

    Read the article

  • Adding picture in pickerview

    - by iSharreth
    UIImageView *one = [[UIImageView alloc]initWithImage:[[UIImage alloc] initWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"ball1.png"]]] ; UIImageView *two = [[UIImageView alloc]initWithImage:[[UIImage alloc] initWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"ball2.png"]]] ; UIImageView *three = [[UIImageView alloc]initWithImage:[[UIImage alloc] initWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"ball3.png"]]] ; arrayBalls = [[NSArray alloc]initWithObjects:one,two,three,nil]; I used the above code for displaying image in the pickerview. But the application is crashing when executing this code. Anyone please help.

    Read the article

  • Problem with playing a sound when a button is clicked.

    - by iSharreth
    in my code: import "MyViewController.h" import (IBAction)playSound{ AVAudioPlayer *myExampleSound; NSString *myExamplePath = [[NSBundle mainBundle] pathForResource:@"myaudiofile" ofType:@"caf"]; myExampleSound =[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:myExamplePath] error:NULL]; myExampleSound.delegate = self; [myExampleSound play]; } But it is showing a warning that Class MyViewController does not implement AVAudioplayerDelegate. Anyone please help. I had included the AVFoundation.Framework.

    Read the article

  • Executing codes in viewDidLoad

    - by iSharreth
    In my .m file : (void)viewDidLoad { [super viewDidLoad]; /* Some codes for picker view and slider */ } I used a button to navigate to second view by using the below code: (IBAction)goToPlay{ [self presentModalViewController: secondViewController animated: YES]; } I used another button to go back to first view by using below code: (IBAction)goBack{ [self dismissModalViewControllerAnimated:YES]; } Now the viewDidLoad method is not calling. I had written some codes in viewDidLoad in first view and I want to execute it when pressing goBack button in second view. What should I do? Anyone please help.

    Read the article

  • Adding a button inside an image.

    - by iSharreth
    CGRect frame = CGRectMake(round((self.view.bounds.size.width - kImageWidth) / 2.0), kTopPlacement, kImageWidth, kImageHeight); self.containerView = [[[UIView alloc] initWithFrame:frame] autorelease]; [self.view addSubview:self.containerView]; // create the initial image view frame = CGRectMake(0.0, 0.0, kImageWidth, kImageHeight); self.mainView = [[[UIImageView alloc] initWithFrame:frame] autorelease]; self.mainView.image = [UIImage imageNamed:imagePath]; I want to put a button inside mainview.image. How can I do it? Any help will be greatly appreciated.

    Read the article

  • How can I play a music such that it automatically replay it after its end?

    - by iSharreth
    AVAudioPlayer *myExampleSound; NSString *myExamplePath = [[NSBundle mainBundle] pathForResource:@"myaudiofile" ofType:@"caf"]; myExampleSound =[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:myExamplePath] error:NULL]; myExampleSound.delegate = self; [myExampleSound play]; How can I play myExampleSound such that it automatically replay after its end? Anyone please help.

    Read the article

  • Zooming image in a scroll view

    - by iSharreth
    I want to zoom an image in a scroll view. I used the below code. All are working fine, but the image is not zooming. Anyone please help. I am a beginner in iPhone app development. I had connected the delegate to files manager and set max zooming to 5 I can see the image. But how can I zoom it. IBOutlet UIScrollView *scrForImg; IBOutlet UIImageView *imgForScr; (void)viewDidLoad { [super viewDidLoad]; NSString *imagePath = [NSString stringWithFormat:@"myImage.png"]; imgForScr.image = [UIImage imageNamed:imagePath]; } -(UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView{ return imgForScr; }

    Read the article

  • hiding network activity indicator

    - by iSharreth
    - (void)viewWillAppear:(BOOL)animated { app = [UIApplication sharedApplication]; app.networkActivityIndicatorVisible = YES; NSURL *url = [NSURL URLWithString:@"http://www.google.com"]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; [webView loadRequest:request]; } -(void)webViewDidFinishLoad { app.networkActivityIndicatorVisible = NO; } I want to hide the network activity indicator after webpage is loaded. I had written the above code. But the indicator is not hiding after the webpage is fully loaded. Anyone please help.

    Read the article

  • Row index of pickerview is not displaying correctly.

    - by iSharreth
    I had used images in pickerview. But the row number is not displaying correctly. Anyone please help. I used the below code: - (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view { NSLog(@"Row : %i",row); return [customPickerArray objectAtIndex:row]; }

    Read the article

1