I have some following requirements, I don't know can we do this in iPhone or not.
Requirements are like
1.Can i open ad in safari browser after click.
2.Can i open ad in application itself in webView.
3.If i open ad in webview in that if i click particular link that link can open in safari browser.
If anyone knows all this. please help me. I will appreciate. Thank u in advance.
This isn't how iAd works, with iAd you implement the ad banner, and Apple pushes you content to fill it with, which you have VERY limited control over.
To do what you're asking I recommend that you make your own ad, but not an iAd. Doing this you can make whatever you want(within reason) happen when the user clicks it.
Ex.
- (void)callUpAd
{
UIView *myAdSubView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 40)];
//add your ad material here
[self.view addSubview:myAdSubView];
}
Related
I am working for Facebook integration in my iPad app. I am using FBFriendPickerViewController for same. My app is working fine on iOS 6 for landscape as well as portrait mode but when I use iOS 7 then friend picker controller works fine ONLY for portrait. When try to launch it in landscape mode then white view pops up. I could see faint friend picker view in background but very hard to see that. Do anyone have any idea what must be the reason? Code base I have used is as below.
if (!_friendPicker) {
self.friendPicker = [[FBFriendPickerViewController alloc] init];
// _friendPicker.delegate = self;
_friendPicker.title = #"Select a friend";
_friendPicker.allowsMultipleSelection = NO; // Share dialog doesn't allow more than one recipient
}
[_friendPicker clearSelection];
[_friendPicker loadData];
_friendPicker.modalPresentationStyle = UIModalPresentationFormSheet;
[_friendPicker presentModallyFromViewController:self
animated:YES
handler:nil];
Same thing I have observed on facebook sample app "HelloFacebookSample" :)
Try:
Get the newest Facebook SDK, because in the above link a Facebook rep says the issue should be resolved. The modal frame still takes into account the space for the status bar so you'll have to find a way to deal with it (doesn't bother me enough to spend time solving it at this point).
I also removed a [[UINavigationBar appearance] setTitleTextAttributes:]; line from my app delegate, so maybe try removing all nav bar customisation and see what you get.
Good luck.
Here we are using UIWebview related application.
while clicking on some links, it's automatically connect(go) to the itunes.
but it's cannot get back to the app after clicking a itunes link (with out clicking on Exit).
My Question is, how can come back to the app after clicking a itunes.
Try this one uiwebview delegate method.
-(BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType
{
NSURL* url = [request URL];
if (UIWebViewNavigationTypeLinkClicked == navigationType)
{
[[UIApplication sharedApplication] openURL:url];
return NO;
}
return YES;
}
I usually insert a button next to UIWebView.
Use a new view and insert button in any corner of view and then put your UIWebView, set your uiwebview is not fit to screen so you can push to exit button. When you tap to button than hide your view. ITs usually what i do for such situation, maybe it can help to you
When you click on any link and you now go to at this link of page and if you want to go previous to your application. Generally You can not go Back to your Application because Apple iOS does not provide this types of feature.
I am not sure but It may be possible in JB Device.
you can add custom tool bar at the top of your view and add back button to custom tool bar to come back to your app. Below to custom tool bar add your webview.Hope it will helps you.
If you are loading the webpage with Safri or you are opening iTunes app with custom schema, it is not possible, because you are leaving the app.
But yes you can do this, If you will load that itunes connect link through web view, and there you can place a custom back button to come back to your previous page.
For Example :
UIWebView *webView=[[UIWebView alloc]init];
[self.view addSubview:webView];
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:#"http://www.xyz.com"]]];
In my iphone app i want to change the buttons of media player.for example (play/pause)button,(full screen button)etc.Is this possible.please help me.
I'm sorry but I'm afraid that you can only create you own.
You will need to hide the controller:
[moviePlayer setControlStyle:MPMovieControlStyleNone];
and use a UIToolbar.
I'm developing my app in iPad. I'm designing a login page. In that I need to secure the content in textview (password). Please help me. I know how to do it for textfield, but I need that in UITextview.
This reference will help you.
Just add this to your code
textView.secureTextEntry = YES;
I am streaming an MP3 file using MPMoviePlayer, and I would like to have an image displayed instead of the default Quicktime logo in the background.
I found out a way to have an image overlay the player, but the problem with that, is you have to tap outside the image to get the player controls to appear. And when they do appear, they are underneath the image.
Does someone know how to do this?
Thanks,
John
backgroundColor is deprecated, and diving into private View structures is dangerous. This worked fine for me:
UIImageView *coverImageView = [[UIImageView alloc] initWithImage:coverImage];
coverImageView.contentMode = UIViewContentModeScaleAspectFit;
coverImageView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
coverImageView.frame = moviePlayerController.view.bounds;
[moviePlayerController.view addSubview:coverImageView];
Most every app on the iPhone is made of a hierarchy of views. You could go up to the top root node of the movie player and walk down the child views recursively and set the hidden value to YES until you find the right item, then insert your UIImageView below that item. That way, the controls stay on top and still respond to user inputs.
The risk you run is if Apple changes the MPMoviePlayer UI and shuffles the view hierarchy, but you'll probably have lots of advance notice and can patch your app to allow for the new layout.
There is a question as to whether this is kosher for appstore apps, but many current apps (especially camera/picture-taking ones) are doing it to get rid of standard window elements.
Use AVAudioPlayer and implement your own player UI.
it will work check this
MPMoviePlayerController *moviePlayerController=[[MPMoviePlayerController alloc] initWithContentURL:theURL];
moviePlayerController.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:#"Default.png"]];