ios6

sqlite query to find sum of a year by the given dates

大城市里の小女人 提交于 2019-12-11 09:45:01
问题 I have written a query : SELECT YEAR(Date),SUM(replace(price, ',', '')) FROM example GROUP BY year(date); .I am trying to get sum of all price for that year but I am getting an error - no such function : year. Please guide me .I am a noob in db.Thanks again. 12/10/11 377,245.67 12/19/11 5,104,245.00 12/28/11 23,332.98 12/24/10 126,875.21 12/24/10 5,112,225.14 12/23/10 4,552.54 11/24/10 402.82 10/15/09 132,875.32 9/19/09 126,334,123.32 9/23/09 345,887.21 9/29/09 16,520.11 9/28/09 388,902.02 11

Zoom the page of a view based iOS App

北战南征 提交于 2019-12-11 09:07:36
问题 I have a view based application. I have to add features like pinch zoom and double tap to zoom the page( UIView ) in the iOS application. Its easy to zoom a UIScrollview . I should create a framework which has the option to pan and zoom the entire app. How do a achieve to zoom a view based application? I welcome your ideas! 回答1: The best way to do it, is to put the entire app components in one scrollview and use the zooming of the control. The other way which is not as stable as the first one

How to record and play voice in ios6 using HTML5

99封情书 提交于 2019-12-11 09:05:29
问题 We are developing web application in HTML5 and Javascript. We need to implement voice recording functionality. We have used Wami Api but it is not supporting on iPad as its using flash for recording. Can you please give idea which is best option for recording voice in iPad in web application ? Is there any API or library ? Please suggest.. Thanks 回答1: You can use Phonegap and make it an app - that way you'll have access to some native APIs, like: http://docs.phonegap.com/en/2.5.0/cordova

How it works didReceiveMemoryWarning for iOS 6

故事扮演 提交于 2019-12-11 08:29:01
问题 I don't know too much information about didReceiveMemoryWarning but considering what I read on other posts and looking for in the documentation, I've seen that in case of iOS 5, any non-visible view controller will dump its view, but in case of iOS 6 the documention (documentation says that the default implementation "exits" and I don't know exactly how I should understand that. I've been doing some tests with the iOS Simulator simulating a low-memory warning, and I appreciate (on iOS 5) that

How to show loading view controller in my webservices

五迷三道 提交于 2019-12-11 08:24:29
问题 I want to show a loading view controller or activity indicator view when I call my loginUserintoserver method but while debugging I found the view becomes inactive at this line. NSData *responseData = [NSURLConnection sendSynchronousRequest:theRequest returningResponse:nil error:nil]; For sometime till I get the response. I have tried showing activity indicators but did not succeed. Please any guidelines to resolve this. Thanks in advance. -(void) loginUserintoserver { NSString *str

Buttons on a UICollectionViewCell

寵の児 提交于 2019-12-11 08:18:02
问题 One of the new ios6 classes is uicollectionview which allows one to display items in a grid format similar to the Homescreen / iBooks / Pages layout. Is there was a way to receive a touch event on a button that is on the UICollectionViewCell? Currently, my cell is created through an XIB file and added to the UICollectionView programatically. I'm looking for something similar to the Detail Diclosure Indicator on a UITableView. After looking through Apple's documentation here, I don't see any

dateFromString working in ios 6 but not in ios 5

↘锁芯ラ 提交于 2019-12-11 06:33:31
问题 This code working on iOS 6.0 simulator, but not working on iOS 5.0 NSString *unformattedDate = @"2008-09-25T20:41:11.000+00:00"; NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ"]; NSDate *dateFromString = [dateFormatter dateFromString:unformattedDate]; [dateFormatter setDateFormat:@"dd.MM.yy"]; NSLog(@"%@", [dateFormatter stringFromDate:dateFromString]); What can be wrong? 回答1: Since the ZZZZZ date format specifier

Xcode 4.5 UIScrollView

陌路散爱 提交于 2019-12-11 06:22:45
问题 I'd like to add a scrollview to my project. I've added the following code in my file: - (void)viewDidLoad { [super viewDidLoad]; [scrollView setScrollEnabled:YES]; [scrollView setContentSize: CGSizeMake(320, 830)]; } This works good with xcode 4.3 und IOS 5. But know it doesn't scroll. If I deactivate Auto Layout in the file inspector it works perfect. But the layout in for iPhone 4 with the smaller display is not correct. The layout in iPhone 5 looks good. What should I do, when I want don't

EXC_ARM_DA_ALIGN error when running on a device

别等时光非礼了梦想. 提交于 2019-12-11 05:30:07
问题 Why is this code running on the simulator and crashing on a real device? I have a very simple code that draws a circle. The code subclasses UIView and runs fine on the Simulator (both for iOS 5.1 and iOS 6.0). Circle.h #import <UIKit/UIKit.h> @interface Circle : UIView @end Circle.m #import "Circle.h" @implementation Circle -(CGPathRef) circlePath{ UIBezierPath *path = [UIBezierPath bezierPath]; [path addArcWithCenter:self.center radius:10.0 startAngle:0.0 endAngle:360.0 clockwise:YES];

How to add an UINavigationController to an UIViewController presented as Modal

萝らか妹 提交于 2019-12-11 05:23:25
问题 I have an alternative flow in my app. This flow starts in my firstViewController, then in this view a call my secondViewController like this: - (IBAction)PressButton:(id)sender { SecondViewController *second = [[SecondViewController alloc] init]; second.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; UINavigationController *nav = self.navigationController; [nav presentViewController:second animated:YES completion:nil]; } In my secondViewController I want to push my