iphone,ios,ios6,uiwebview,youtubeRelated issues-Collection of common programming errors
anonymous
iphone objective-c ios xcode
I have uiscrollview with some buttons in it. I want to make one particular button to glow.I made glowing-pulsating effect of button with following code:(button in UIView)- (IBAction)selectChampionAction:(id)sender{if ( self.timer ) {// Stop timer[self.timer invalidate];self.timer = nil;// Workaround: we have to return the layer’s delegate property to what it was// Otherwise, we will encounter an unexpected resultself.viewForGlowing.layer.delegate = self.viewForGlowing;} else {// Woraround: UIVie
Bourne
iphone ipad uiscrollview
I have a UIScrollView with textviews as subviews. Now in my app there are multiple UIScrollViews like these. And depending on the selection I display the appropriate UIScrollView on top of the previous view. This works fine in all cases except when the previous view has been a UIScrollView as well. In this case the behavior I get is of two UIScrollViews stacked on top of each other and both the views capture the scrolling events. The textViews from previous scrollView is also visible (not editab
OpenThread
iphone ios uitableview
I need to get notified when an UITableView’s drag has come to an end.But I’m working on an UITableView’s category, so I can’t use scrollViewDidEndDragging:willDecelerate: to archive this.I tried use KVO to observe on dragging Key Path:[self addObserver:self forKeyPath:@”dragging” options:NSKeyValueObservingOptionNew context:nil];But observeValueForKeyPath:ofObject:change:context: didn’t get called, since UITableView.dragging doesn’t have and setter and this property is not compliant with KVO.Is
Avinash Jha
iphone datepicker
I have a date picker to calcuclate age. When first time I select date it shows correct o/p but when next time I select date – app crashes.My code:NSDate *selected = [date1 date]; NSDateFormatter *df=[[NSDateFormatter alloc] init];float interval=[selected timeIntervalSinceNow] * -1.0;float year=interval/31556926;if (year>10) {alert.tag=0;alert=[[UIAlertView alloc]initWithTitle:@”Calculate Age” message:@”Congratulation!!!!Your Age Is Grater Than 10″ delegate:self cancelButtonTitle:@”Cancel” o
Hunter
iphone ios core-data nsmanagedobjectcontext
I’ve got an app design question that I’m hoping someone can help with.Let’s take a very simple setup: Core Data app for displaying news items from a server.Main thread / UI has a managed object context that’s used by all the view controllers to display the data. An NSOperation runs in the background checking the server, with it’s own context, on the same persistent store.I want to merge the changes in the background context so I use NSManagedObjectContextObjectsDidChangeNotification.According to
Appz Venture
iphone uiview
when i goto the next view support in UIView based application, i have to goto secondView * = [[secondView alloc]initWithNibName:@”secondView” bundle:[NSBundle mainBundle]]; [UIView beginAnimations:@”ani” context:nil]; [UIView setAnimationDuration:0.9]; [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view cache:NO]; [UIView commitAnimations]; [self.view addSubview:secondView.view];my question is that i can’t release the secondView because my object are remove on the sa
QueueOverFlow
iphone ios json parsing
I have the following details, for get the data from server. What is the use of methodIdentifier and web service name ?{“zip”:”12345″,”methodIdentifier”:”s_dealer”}url:- http://xxxxxxxxxxxxxxx.com/api.php method: post web service name: s_dealerresponse : {“success”:”0″,”dealer”:[info…]}I don’t know how to send zip number “12345” with the url. Please direct me on right direction. I use the following.-(void)IconClicked:(NSString *)zipNumber {NSString *post = [NSString stringWithFormat:@”&zi
Jano
iphone ios objective-c
I have a NSObject category to execute blocks after some interval. Do I need to weak self in this instance? __weak ViewController *weakSelf = self; [self runBlockAfterDelay:0.6 block:^{weakSelf.someview = …}];// Category – (void)runBlockAfterDelay:(NSTimeInterval)delay block:(void (^)(void))block {dispatch_async(dispatch_get_main_queue(), ^{[self performSelector:@selector(executeBlockAfterDelay:) withObject:[block copy] afterDelay:delay];}); }- (void)executeBlockAfterDelay:(void(^)(void))block
Hermann Klecker
iphone objective-c ios ios-simulator
I get this crash in the simulator only. On a real device it works and debugs fine. (Therefore it is not too critical but I am working on a presentation for which the simulator comes handy.)- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person {[self displayPerson:person];if ([self respondsToSelector:@selector(dismissViewControllerAnimated:completion:)]){[self dismissViewControllerAnimated:YES completion
Matthew Flaschen
iphone objective-c
Hello I have create an application on iphone using objective-c.In this application i am just displaying different players images stored in one folder, which will be run perfectly on simulator. But when I deploy it on iphone it is not showing the images of the player. for that the code is:UIImageView *imageplayer = [[UIImageView alloc]initWithFrame: CGRectMake(imgx, imgy+45,135,150)]; imageplayer.image = [UIImage imageNamed:playerpng];if(imageplayer.image == nil)[imageplayer setImage:[UIImage im
anonymous
iphone objective-c ios xcode
I have uiscrollview with some buttons in it. I want to make one particular button to glow.I made glowing-pulsating effect of button with following code:(button in UIView)- (IBAction)selectChampionAction:(id)sender{if ( self.timer ) {// Stop timer[self.timer invalidate];self.timer = nil;// Workaround: we have to return the layer’s delegate property to what it was// Otherwise, we will encounter an unexpected resultself.viewForGlowing.layer.delegate = self.viewForGlowing;} else {// Woraround: UIVie
gling
ios restkit-0.20
i m new with restkit and i have an issue with that. I have a restservice for check in. So i m calling my restservice with a “Put”-request. Looks like that Put: http: … /api/v1/locations/location/[Location-ID]/checkin?userId=[User-ID]. The response is a , so i called it checkin-object. After the check in i m calling another service (Get-Request). But the new mapping-result of the get-request includes previous checkin-object. How do i reset/erase it?[self.restHelper checkinUser:[NSNumber numberW
Kyle Decot
ios objective-c sprite-kit game-physics
I am having a problem when trying to put two blocks that have physics bodies on top of one another.http://s1173.photobucket.com/user/Kyle_Decot/media/example_zps02f027fe.mp4.htmlAs you can see in the video I am able to place my block on top of the stacked blocks even though they are placed right on top of one another.Both the player block and the other blocks inherit from a base Block class which looks like this#import “Block.h”@implementation Block+ (void)loadSharedAssets {}- (id)initWithColor:
Robert
ios image-processing gpuimage
I have tried to setup a simple GPUImage environment in a UIViewControler. However, I get a blank screen. I want to animate a property of the swirl filter whilst the source image is kept constant. How can I do this?I want good performance (> 30 fps) for large-ish images so would ideally like to avoid unnecessary pixel copies back and forth from GPU to CPU.- (void)viewDidLoad {UIImage *inputImage = [UIImage imageNamed:@”image.jpg”];self.stillImageSource = [[GPUImagePicture alloc] initWithImage:
OpenThread
iphone ios uitableview
I need to get notified when an UITableView’s drag has come to an end.But I’m working on an UITableView’s category, so I can’t use scrollViewDidEndDragging:willDecelerate: to archive this.I tried use KVO to observe on dragging Key Path:[self addObserver:self forKeyPath:@”dragging” options:NSKeyValueObservingOptionNew context:nil];But observeValueForKeyPath:ofObject:change:context: didn’t get called, since UITableView.dragging doesn’t have and setter and this property is not compliant with KVO.Is
mightee.cactus
ios objective-c uitableview pstcollectionview
In the app I develop I have a bunch of tiles (PSTCollectionView) on the screen. When user clicks on one cell he gets moved to another controller by calling segue programmatically. To avoid clicking cell several times at a time I add transparent overlay right after cell click that should prevent clicking at any collection tile.Everything seemed to go well until I run it on iPad 1: in some cases device hangs a bit and overlay appears a bit late which leads to the situation that allows user to clic
Aaron Brager
ios objective-c core-animation calayer quartz-graphics
On iOS, I am adding a CALayer to a UITableViewCell’s layer. This is my first time using CALayer, and it is simply supposed to change the background color of the table cell. My goal is (1) to learn how to use CALayer, and (2) to test using Instruments whether the drawing is faster than my current implementation, which slows down on CGContextFillRect.(Technical Q&A QA1708 was the catalyst for all this.)Current Implementation (works)- (void)drawRect:(CGRect)r {UIColor *myColor = [self someCol
Brian Douglas Moakley
ios apple human-interface
I’m currently developing an app for a client which makes use of a tabbar, but I’m concerned I may be violating the human interface guidelines. My app starts with a home viewcontroller which leads to several other viewcontrollers. One of the viewcontrollers has a tabbar. The very first item on the tab bar is a home button. Clicking the button will send the user back to the home viewcontroller. The home view controller does not have a tabbar. The question of the hour … is this a violation
Hunter
iphone ios core-data nsmanagedobjectcontext
I’ve got an app design question that I’m hoping someone can help with.Let’s take a very simple setup: Core Data app for displaying news items from a server.Main thread / UI has a managed object context that’s used by all the view controllers to display the data. An NSOperation runs in the background checking the server, with it’s own context, on the same persistent store.I want to merge the changes in the background context so I use NSManagedObjectContextObjectsDidChangeNotification.According to
Undo
ios json parsing textview
I am making an iOS application which communicate with an database via an API. The API sends valid JSON to the application but the application gives no error but another result: NULL. Here is my code for the iOS app:// Start hudMBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];hud.labelText = @”Zoeken…”;return TRUE;}- (void)requestFinished:(ASIHTTPRequest *)request{ [MBProgressHUD hideHUDForView:self.view animated:YES]; if (request.responseStatusCode == 400) {textVie
abisson
ios6 restkit
So I switched to using RestKit 0.2 and CoreData and I’ve been having a lot of trouble trying to get the mappings correct… I don’t understand why. The JSON Response of my server is like this:{ “meta”: {“limit”: 20, “next”: null, “offset”: 0, “previous”: null, “total_count”: 2}, “objects”: [{“creation_date”: “2012-10-15T20:16:47”, “description”: “”, “id”: 1, “last_modified”: “2012-10-15T20:16:47”, “order”: 1, “other_names”: “”, “primary_name”: “Mixing”,”production_line”: “/api/rest/productionlin
user754905
ios ios6 uirefreshcontrol
I am currently using a JASidePanel for my application and I have a UITableViewcontroller with a UIRefreshControl as one of the ViewControllers for it. The width of my tableview still has a width of 320 pixels so the UIRefreshControl gets centered right in the middle of the view. I’m trying to figure out if there’s a way to offset the UIRefreshControl (moving the x by 20 pixels to the left) so that it looks centered when I have my side panel visible.Thanks!
Tullio Onion Sebastiani
iphone objective-c ios6 storyboard navigationcontroller
I’m developing an iOS6 App with storyboards and i’m encountering an unexpected beahviour. My app is almost in portrait mode , and i would keep this orientation in all the views except two.For this reason the project supports both landscape and portrait mode, i’ve subclassed navigation controller with a category (as explained almost everywhere :-)in Appdelegate.m and every view controller implements – (NSUInteger)supportedInterfaceOrientations{return UIInterfaceOrientationMaskPortrait; (landscap
Lukas Kukacka
ios6 storyboard autolayout
I am struggling with Autolayout (using it for the first time in a new app).Following situation:Storyboard iPad Autolayout enabledIn one Popover I need to re-layout 8 buttons programmatically according to user-selection. This works fine until the moment where the buttons must be rotated by 180° (to be viewed upside down, which is an app feature).As soon as I add the code for the rotation, the relayout does not work anymore. I don’t understand why I can change the position of the buttons (like Cas
Aitul
ios6 game-center invitation
I am developing a turn based game using the Game Center. I handle the invitations to play using the following code::GKMatchmaker sharedMatchmaker].inviteHandler = ^(GKInvite* acceptedInvite, NSArray *playersToInvite){if(acceptedInvite != nil){// Get a match for the invite we obtained…NSLog(@”Valor de la invitacion %@”,acceptedInvite);[[GKMatchmaker sharedMatchmaker] matchForInvite:acceptedInvite completionHandler:^(GKMatch *match, NSError *error){if(match != nil){NSLog(@”match != nil: “);}else
poupou
xcode mono monotouch monodevelop ios6
I have a problem building my app on MonoTouch and iOS 6.My system configuration is:Mac OSX 10.7.4 (Lion) MonoTouch 5.2.13 MonoDevelop 3.0.3.5 XCode 4.5 with iOS 6 SDK beta 4.To link new iOS SDK I have selected on MonoDevelop preference SDK location (for me it’s on desktop) and i have restarted it.Now, when I try to build my application, MonoDevelop gives me following error:Unexpected error – Please fill a bug report athttp://bugzilla.xamarin.com (MT0000) Can anyone help me to understand what is
Bacalso Vincent
ios svn ios6 cocoapods xcode4.6.2
So we decided to integrate cocoapods in our existing project which is under SVN. My teammate had successfully setup it and he can just build the project just fine.But when I checked-out the project and did a pod install, this what happens:Analyzing dependencies Downloading dependencies Using ASIHTTPRequest (1.8.1) Using Base64nl (1.1) Installing Facebook-iOS-SDK (3.7.1) [!] Pod::Executable clone ‘/Users/me/Library/Caches/CocoaPods/GitHub/2cdc3c53ee617444d0d6cd7730e598cd77a19eb2’ ‘/Users/me/Desk
SpaceBeers
iphone mapkit ios6 ios6-maps
My understanding was there was no problems moving to iOS 6 maps. But for some reason, the Detail Disclosure Button is now MISSING in my map App. Is there a way to get this back. Wow, totally unexpected. This has been working for years, so all delegates are fine.#pragma mark MKMapViewDelegate – (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>)annotation {MKPinAnnotationView *pin = [[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifi
NSUserDefault
iphone uinavigationcontroller ios6 uiinterfaceorientation
I created an app in ios 6 with navigation view.Also I have set all orientation options in the application summary and even used the-(BOOL) shouldAutoRotateand -(NSUInteger) supportedInterfaceOrientaionmethods in my view controller.when I run my app orientation works fine except upside-down.What should I do to also support upside-down.I also facing the same problem when I add UITabBar controller.Please share your ideas.Thank you
mattkc7
ios xcode ios6 ios-simulator xcode4.5
I’m making an iPad app and it runs on the simulator, but fails when i try building it for the device. the error is below:These are the things i’ve tried to rectify this issue:went through every PNG file with Photoshop and saved them again w/o the interlace Deleted all the images in my Resources folder and added them again by dragging/dropping the images again Deleted ALL PNG images (left the JPGs) and it works…when i add one PNG, Xcode throws a hissy fit. Deleted the derivedData in my ~Library
Oh Danny Boy
ios uiwebview
We can use the following to calculate the scrollWidth of an HTML page in a UIWebView with a fixed height.[webView stringByEvaluatingJavaScriptFromString:@”document.documentElement.scrollWidth”]Is it possible to do this evaluation on local HTML pages without loading a request into a UIWebView?Would like this to occur on a separate thread.
mauris
iphone objective-c uiwebview
Basically i have a WebView on SecondViewController and I wish for the WebView to be visible on every view like a tab bar and fully controllable on each view.Please note the WebView will be on a webpage with a online slideshow so I cannot simply reload on each viewAlso in the SecondViewController I have – (void)webViewDidFinishLoad:(UIWebView *)YouTubePlayer {
Nic Hubbard
iphone ios uiwebview
I am pretty sure that I understand how to catch a click on a UIWebView using the webView:shouldStartLoadWithRequest:navigationType: method, but my webView does not even allow me to click the link. I am using: UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(12, top, boundsSize.width – 40.0, 400.0f)]; webView.delegate = self; webView.backgroundColor = [UIColor clearColor]; webView.opaque = NO; webView.allowsInlineMediaPlayback = YES; webView.dataDetectorTypes = UIDataDetectorType
jhilgert00
ios uiwebview uiscrollview image-gallery
I try to create image gallery where gallery will have long description like shown image bellow.The problem is because UIWebView can be any height (depend on text height). So I add UIScrollView so I can scroll if description is higher than page. So how can I set the height of UIWebView and how can I place UIView (with images) that will always be under the UIWebView?
Lem
javascript ios css uiwebview
I have an infinite carousel made of UIWebViews. On every swipe, one UIWebView gets removed (ARC) and one gets built. On the main thread, the UIWebViews are populated with html by calling loadHTMLString:baseURL: on the UIWebView instance. Most of the time it works as expected: the html gets its layout from css- and js-scripts. But sometimes it fails and the html is presented without styles. (Sometimes it is shown with styles but without fonts loaded with @font-face.) css- and js- files definitely
Daniel Fischer
iphone ios uiwebview
How can I detect UIWebView reaching the top or bottom? Because I need to trigger an action when I reach the bottom.So is that doable?
Nekto
iphone ios xcode uiwebview uiscrollview
I have added a UIWebView along with some labels inside UIScrollView (using StoryBoards) by adding it as a subview and then setting the ScrollView height to show all the html content of WebView that is loaded in it using loadHtmlString.The links in the html content are not working. A little searching revealed that Apple does not recommend putting UIWebView inside UIScrollView to avoid unexpected behaviour. But as i also have to add labels and other stuff other than the UIWebView, so i have to emb
Thermometer
ios iphone objective-c uiwebview ios7
The Problem:I have a UIWebView between my UINavigationBar and UITabBar. On iOS 7, when the app enters background and comes back again, it seems as if the contentSize property of the UIWebView changes so that there is a white block above it. After monitoring the contentSize of the UIWebView, when the application enters foreground (I check it by observing the UIApplicationDidBecomeActiveNotification), it has 49 substracted from it’s height. Screenshot (redacted sensitive info):My Settings: I am us
Alexander Longbeach
ios ipad uiwebview
I have a UIWebview inside a UIScrollview with a lot of content. When the content loaded by the UIWebView is really big, its starts to lag.Does anyone know how to solve this issue? Keep in mind that it only lags when the UIWebview’s height becomes considerably big.Thank you in advance!
Darko Rodic
ios uiwebview uiscrollview
I have view controller with following view hierarchy:UIView’- UIScrollView’- UIWebView’- UIWebView’- … more UIWebViewsUIScrollView has paging enabled and each page contains one UIWebView. UIScrollView occupies entire screen, UIWebView as well.Now my problem is that I need to detect touches on entire screen. I guess that UIScrollView somehow eats most of those (and since UIWebView contains scroll view as well, things got even more complicated).I tried subclassing each of those views and tried b
Groxx
ios youtube url-scheme
No, wait, don’t go! I’m serious.I was (am?) attempting to rickroll my coworkers in celebration of defeating the iOS beast in our latest battle, when the hydra decided to get the last laugh. Clicking on links to, or openURL with, either of http://www.youtube.com/watch?v=dQw4w9WgXcQ or http://www.youtube.com/watch?v=oHg5SJYRHA0 (the two major rickrolling videos) results in a “Could not load movie” error. But when I find the video through the Youtube app, it plays fine. Other video URLs chosen
user1618143
html http firefox https youtube
I’m working on a site that requires a login and includes embedded Youtube videos. Because of the login, I need to get SSL working, which it largely is. I’m hitting an unexpected problem with the Youtube embeds, though. It’s easy enough to point at https://www.youtube.com, but Firefox still complains that there’s unencrypted content on an encrypted page. According to Firebug, the only unencrypted load was from http://[stuff].youtube.com/videoplayback?[more stuff].Now, it’s perfectly understandabl
user1510201
javascript jquery youtube fancybox fancybox-2
I’ve setup a PHP video browser on a website (check videos pod) when a video thumbnail is clicked a video should popup and play with the FancyBox script, but instead the video just does not load. Why is this?
faaust
javascript php jquery html youtube
Hi I just wants to simply get a url from youtube and represent the html content.. My code looks like this now:$.ajax({url: “http://www.youtube.com/watch?v=VIDEOID”,type: ‘get’,dataType:’jsonp’,crossDomain:true,success: function(data,text,xhqr){console.log(data);}});And the result is: Resource interpreted as Script but transferred with MIME type text/html: “http://www.youtube.com/watch?v=rr5EyyhSU_k&callback=jQuery110209012887296266854_1387530192875&_=1387530192876”. jquery.js:8516 Uncaug
James A Mohler
jquery iframe youtube fancybox
I’m having problems with the latest version of fancybox 2.0.2 and am wondering if anyone can help me.When closing an iFrame (YouTube) fancybox window on IE8 with the closeEasing: easeInBack option enabled, it doesn’t close properly and the youtube video that is called up using fancybox gets blown up to fill the browser window. the only way to get back to the original page is to refresh the browser.Here’s the link: http://kamehamehapublishing.org/kumukahi/I’m wondering what it could be?Thanks in
sth
php api youtube simplexml
I keep getting this error in line 54 and I don’t know why. All that I’m trying to do is to process the first entry of the query result: extract it’s URL so as to construct an embeddable video object.<?phpfunction extractID($youtubeURL){//split off the final bit of the URL beginning with ‘=’$youtubeID = strchr($youtubeURL,’=’);//remove that equals sign to get the video ID $youtubeID = substr($youtubeID,1);return $youtubeID;} ?> <?php// set feed URL$lang = $_POST[‘language’];$query = $_P
Schart
javascript jquery youtube switch-statement generator
I’m basically doing a generator with Javascript and jQuery for embedding videos. Now because of the large code, and possible fails everywhere, I’m simply going to link to a page and you can view the source. The console says “Unexpected string” and when I removed the single quotes around the input it goes “Unexpected number”, so I’m not sure what to do. Anyways, here’s the code:http://haakon.underbakke.net/randomshitduikkekanforstaa/gen.html
ankur.trapasiya
13.04 hard-drive shutdown ram youtube
I am using ubuntu 13.04 since quite a lot time and from the past few months I am getting a weird problem which is it gets shutdown unexpectedly. What i have observed is whenever I am playing some video from the youtube/VLC player, the shutdown chances are high. I am not sure for what reason I am getting this problem.I am not able to solve the problem. Any kind of help would be appreciated.Thanks in advance.
CrazyDev
iphone xcode uiwebview uiscrollview youtube
I already had 10 youtube video links on server.Every youtube video should be thumbnail in webview.in a given image the (redbox) show the space is less for showing all youtube thumbnails in webview,so how we can scroll the (redbox) area of viewcontroll and how to create webview at runtime for each youtube link top to bottom in (redbox) area.Any suggestion or help will be appriated.thanx in advance
mdb
android flex mobile air youtube
Is there any way to embed YouTube video/video player into Android Flex AIR Mobile application?I tried to use SWFLoader(…) but since its MX library class only works on the desktop runtime environment, but fails to work on actual Android device when debugging the application. Any ideas?Maybe it’s possible to embed HTML that contain YouTube video into some Flex media container like TextArea or something?
Web site is in building