ios7.1

IOS: How to split an UIImage into parts

青春壹個敷衍的年華 提交于 2019-12-08 04:13:53
问题 In one of my application I need to split UIImage into multiple parts. The following was the code I am using to split. Here my problem is I am unable to load the image view by adding the image to UIImageView. - (void)viewDidLoad { UIImage* image = [UIImage imageNamed:@"monalisa.png"]; NSMutableArray* splitImages = [self splitImageIntoRects:(__bridge CGImageRef)(image)]; printf("\n count; %d",[splitImages count]); CALayer *layer = [splitImages objectAtIndex:5]; CGImageRef imgRef = (__bridge

IOS: How to split an UIImage into parts

泪湿孤枕 提交于 2019-12-08 02:45:40
In one of my application I need to split UIImage into multiple parts. The following was the code I am using to split. Here my problem is I am unable to load the image view by adding the image to UIImageView. - (void)viewDidLoad { UIImage* image = [UIImage imageNamed:@"monalisa.png"]; NSMutableArray* splitImages = [self splitImageIntoRects:(__bridge CGImageRef)(image)]; printf("\n count; %d",[splitImages count]); CALayer *layer = [splitImages objectAtIndex:5]; CGImageRef imgRef = (__bridge CGImageRef)(layer.contents); UIImage *img = [[UIImage alloc] initWithCGImage:imgRef]; UIImageView*

Not scanning credit/debit cards using card.io

允我心安 提交于 2019-12-07 07:05:08
问题 I am using card.io_ios_sdk_3.8.0 , I followed exactly what is mentioned in https://github.com/card-io/card.io-iOS-SDK. I am unable to scan credit or debit cards (VISA , Discover, etc). I get "NSScanner: nil string argument". I know I am making a mistake but I don't know how to track that. Is there any country based? - (IBAction)scanCard:(id)sender { CardIOPaymentViewController *scanViewController = [[CardIOPaymentViewController alloc] initWithPaymentDelegate:self]; scanViewController.appToken

BLE takes too much time while sending data from iOS 7.1 to iOS 8

左心房为你撑大大i 提交于 2019-12-06 01:54:01
问题 I have a strange issue. I am developing an app in which I am sending Chunks in 20-20 bytes. . Everything is working fine. When I am sending Bytes data from iOS 8 to iOS 8 device it take around 4-5 second to transfer from one device to another, but my problem is when I am sending Bytes data from iOs 7.1 to iOs 8 or reverse, It take around 17-20 seconds to transfer the data from one device to any device. Why it's taking too much time in iOS 7.1 to iOS 8 or reverse? 回答1: Try to look at some of

Not scanning credit/debit cards using card.io

天涯浪子 提交于 2019-12-05 18:09:27
I am using card.io_ios_sdk_3.8.0 , I followed exactly what is mentioned in https://github.com/card-io/card.io-iOS-SDK . I am unable to scan credit or debit cards (VISA , Discover, etc). I get "NSScanner: nil string argument". I know I am making a mistake but I don't know how to track that. Is there any country based? - (IBAction)scanCard:(id)sender { CardIOPaymentViewController *scanViewController = [[CardIOPaymentViewController alloc] initWithPaymentDelegate:self]; scanViewController.appToken = @"<I have entered my app token>"; // get your app token from the card.io website [self

SQLite “database disk image is malformed”

天涯浪子 提交于 2019-12-05 17:45:16
问题 I am having trouble with an app where the SQLite database is getting corrupted. There was the odd case of this previously, but it seems to have become a lot more common after the release of iOS 7.1. I'm using the SQLite wrapper by Matteo Bertozzi that you can find here: https://github.com/ConnorD/simple-sqlite The database gets corrupted and spits out the error database disk image is malformed , some queries can be run but the existing data gets messed up. I have searched high and low and can

Prevent AVCaptureSession from crashing once user toggles Camera privacy settings

不问归期 提交于 2019-12-05 13:21:36
Been using AVCaptureSession to record barcodes, and it works well. I also have followed the advice on stack overflow ( How to properly release an AVCaptureSession ) to [_session stopRunning]; [_prevLayer removeFromSuperlayer]; _prevLayer = nil; _session = nil; in ViewWillDisappear, with the hope that it properly releases the CaptureSession. (Other answers in SO refer to pre ARC time) However, when I toggle the camera privacy settings for the App (E.g. from enabled to disabled, or vice versa), the App crashes. This is a problem because a user that doesn't originally enable Camera cannot do it

Customize Button shape in ios 7.1

眉间皱痕 提交于 2019-12-05 08:59:49
Apple has added Button shape feature in ios 7.1. But I need to make it disable for my app or change its default color, shape to match UI of my app. It is possible without using custom type button? Please help me. Sub class the button and try which shape you want.... #import "YourButton.h" #import <QuartzCore/QuartzCore.h> @implementation YourButton - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { // Initialization code } return self; } - (void)awakeFromNib { [super awakeFromNib]; CALayer *mask = [CALayer layer]; mask.contents = (id)[[UIImage imageNamed:@"ge

monitoringDidFailForRegion when regioning for iBeacon, kCLErrorDomain error 5

不羁岁月 提交于 2019-12-05 02:22:52
问题 I am working on a simple App that uses CoreLocation in iOS7.1 to determine a pre-set iBeacon. My Code did work very well until it suddenly stopped. I didn't change anything in the code. The Error occured was "kCLErrorDomain error 5" on "monitoringDidFailForRegion" after start monitoring on "ViewDidLoad": self.locationManager = [[CLLocationManager alloc] init]; self.locationManager.delegate = self; NSUUID *uuid = [[NSUUID alloc] initWithUUIDString:@"0E82E0A4-03FF-4A92-9C87-1F978917BD51"]; self

Resizing behavior of UIPopoverController differs between iOS 7.0 and iOS 7.1

孤街醉人 提交于 2019-12-04 14:43:41
I have a UIPopoverController that contains a UITableViewController within a UINavigationController. Whenever a cell in this table view is pressed, I push yet another UITableViewController to my navigation Controller. I want to set the height of my second table view (let's say to 200) and adjust the size of the popover accordingly. I therefore first set the table view frame in viewDidAppear:(BOOL)animated and then call setPopoverContentSize:(CGSize)size animated:(BOOL)animated . Both heights are set to 200. The resizing works, but there are the following differences on the different iOS