ipad

Ipad: window.height() give bad value in Safari but not in Chrome

放肆的年华 提交于 2020-01-14 06:56:10
问题 I have to get the window's height on Ipad to display something in the full height. I have done this example page: http://daviddarx.com/stuffs/work/biceps/ipad/ Here is my js code, very simple, that only write the window.height() in the body: generalResizeListener=function(){ screenW=$(window).width(); screenH=$(window).height(); $("body").html(screenH) console.log(screenH); } $(window).resize(generalResizeListener); There is two problem, on my ipad2 with IOS7: -In safari, but not in Chrome,

iOS camera UIView overlay full screen on iPad?

守給你的承諾、 提交于 2020-01-14 06:43:15
问题 I'm trying to make an overlay on the camera mode on iPad. when the camera is in landscape mode, the overlay only covers 2/3 of the screen instead of the full screen. It is covering the whole screen in portrait mode however. My guess is the overlay could possibly be only showing in portrait size so that the overlay doesn't appear to be covering the full screen. UIView *overlay = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; overlay.backgroundColor = [UIColor blueColor];

iOS camera UIView overlay full screen on iPad?

爷,独闯天下 提交于 2020-01-14 06:42:06
问题 I'm trying to make an overlay on the camera mode on iPad. when the camera is in landscape mode, the overlay only covers 2/3 of the screen instead of the full screen. It is covering the whole screen in portrait mode however. My guess is the overlay could possibly be only showing in portrait size so that the overlay doesn't appear to be covering the full screen. UIView *overlay = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; overlay.backgroundColor = [UIColor blueColor];

iPhone app is crashing — error-message sent to deallocated instance 0xa58a950

吃可爱长大的小学妹 提交于 2020-01-14 06:01:27
问题 I n my iPhone app, I have implemented sidebar i.e. JTRevealSideBar to show the side bar on left side like facebook app But, the problem is it was crashing after clicking on the sidebar tableview for 1st index but for other index it is perfectly working Crash Log [sidebarViewController:didSelectObject:atIndexPath:]: message sent to deallocated instance 0xa58a950 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { if (self.sidebarDelegate) {

Can we restart an app programmatically in ios when the phone is turned on [closed]

余生长醉 提交于 2020-01-14 05:25:50
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . We have an app that runs in the background, which calls an URL every 15 minutes, but when the phone is turned off and turned on, we want to open the app automatically and resume calling the URL, is this possible??? This is an app that gives a local notification to the user that a website content has changed,

iPhone: Downloading data asynchronously with NSURL request as opposed to [NSData datawithContents ofURL]

梦想的初衷 提交于 2020-01-14 04:31:06
问题 Hi Im a newbie and Im trying to download geocoding data from googleapi webpage. I did it using this: code: NSMutableString *urlStr = [[NSMutableString alloc] initWithString:temp]; NSMutableString *address = [[NSMutableString alloc] initWithString:l.Address]; [address appendString:@" "]; [address appendString:l.CityName]; [address appendString:@" "]; [address appendString:l.State]; [address appendString:@" "]; [address appendString:l.PostalCode]; NSArray *addressArray = [address

iPad - find the true height of a UIWebView

浪子不回头ぞ 提交于 2020-01-14 04:17:05
问题 I work for a media company, and in our iPad application we're upgrading our content so it looks better. Previously, we used a UILabel to display the contents of our posts. I used this to get the actual height of my UILabel: CGSize expectedSize = [label.text sizeWithFont:label.font constrainedToSize:maximumLabelSize lineBreakMode:label.lineBreakMode]; However, we changed our posts' content to HTML, so I'm using a UIWebView. Is there a way to find the true height of the UIWebView, like I do

How to deal with two TableView

和自甴很熟 提交于 2020-01-14 03:58:45
问题 I have two instances of UITableView in one app, and the problem is that I don't know how to define what each table needs to display. Here's the code: .h : { NSArray *array1; NSArray *array2; IBOutlet UITableView *table1; IBOutlet UITableView *table2; } .m : - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [array1 count]; } - (UITableViewCell *)tableView:(UITableView

How to set button type from JavaScript to avoid exception in ipad's safari?

匆匆过客 提交于 2020-01-14 03:53:17
问题 I do this: var b = document.createElement('button'); try{ b.type = 'button'; }catch(e){ alert(e); } On ipad's safari (ios 6.0) the alert shows 'TypeError: Attempted to assign to readonly property.' Works well in Firefox (no exception). What would be the cross-browser way of doing this from JavaScript? I guess I have to set the button type, according to W3C and MDN, because the default type is usually 'submit', and I want type 'button'. -- EDIT -- b.setAttribute('type','button') works, but so

shouldAutorotateToInterfaceOrientation called several times in a row without any rotation

谁说我不能喝 提交于 2020-01-14 03:36:05
问题 I am trying to implement some interface changes in my app, based on the device rotation. My app is a view based app. So, its main view controller has a didload method. The app starts in portrait. Almost all changes on the device orientation triggers the shouldAutorotateToInterfaceOrientation method but this method is not called when the device is put on portrait, after coming from any landscape orientation. While debugging the app, I have put a NSLog(@"orientation=%d", interfaceOrientation);