ios8

deleting a camera roll asset using Photos framework

半腔热情 提交于 2019-12-06 02:34:09
问题 I'm writing a test application to see if it is possible to delete a "photo library" asset in iOS 8, using the Photos framework. Although I suspect it is not possible, I find the documentation to be unclear, and there are posts on this site that seem to indicate it is possible. See here for example. In my test app, I pick an asset from the library: var picker = UIImagePickerController() picker.sourceType = UIImagePickerControllerSourceType.PhotoLibrary picker.mediaTypes = [kUTTypeMovie] In the

Implement heightForRowIndexPath: in iOS 7, but remove it in iOS 8 using compile-time macro

▼魔方 西西 提交于 2019-12-06 02:27:46
I'd like to implement the new auto-resizing table view cells in iOS 8, while maintaining support for heightForRowAtIndexPath: in iOS 7. The problem is I have to remove the method override heightForRowAtIndexPath: for iOS 8, but keep in it for iOS 7. Is there some compile-time macro to use that will accomplish this? You can not use a compile time macro because this is a run time decision. Instead, you can just return UITableViewAutomaticDimension for iOS 8 and if not, return your calculated height value. #define IS_IOS_8_OR_LATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0) -

How do I use iOS auto resizing cells without specifying estimated row height?

夙愿已清 提交于 2019-12-06 02:24:19
I want to leverage Auto Layout taking care of my cell heights automatically in iOS 8, but I hate how finicky estimated row heights make scrolling (jumpy, scroll position unpredictable, etc.). Is there a way to not use estimation so that the table view precalculates all row heights like it did pre iOS 7 (not too many cells so not a performance issue) but uses iOS 8's auto calculating for heights? Edit: There is no way to use dynamic sizing without using this property. estimatedRowHeight tells the system to use a dynamic size, assuming you used Auto layout in you cell. Watch WWDC 2014 Video 226.

iOS 8 Core Image saving a section of an Image via Swift

落爺英雄遲暮 提交于 2019-12-06 02:10:40
问题 I'm using CoreImage Framework for detecting Business Card. When I detect a rectangle (CIDetectorTypeRectangle) I draw an overlay using this method: func drawOverlay(image: CIImage, topLeft: CGPoint, topRight: CGPoint, bottomLeft: CGPoint, bottomRight: CGPoint) -> CIImage { var overlay = CIImage(color: CIColor(red: 0, green: 0, blue: 1.0, alpha: 0.3)) overlay = overlay.imageByCroppingToRect(image.extent()) overlay = overlay.imageByApplyingFilter("CIPerspectiveTransformWithExtent",

Fetching nearby places using google maps

拈花ヽ惹草 提交于 2019-12-06 02:05:25
问题 Am trying to implement to find nearby places of my current location using google maps. I have created a project in Google Developer Console and got 'ios APIkey' and 'Server APIkey'. I also enabled Google Places API and Google Maps SDK for iOS. Below is the code to find out near by places. func fetchPlacesNearCoordinate(coordinate: CLLocationCoordinate2D, radius: Double, name : String){ var urlString = "https://maps.googleapis.com/maps/api/place/nearbysearch/json?key=\(apiServerKey)&location=\

XCode 6.1 iOS 8 keyboard decimal pad is not properly

心不动则不痛 提交于 2019-12-06 02:01:08
问题 My iPhone app was normal in xCode 5 and iOS 7. When I updated to xCode 6.1, it was still normal. But after I update iOS 7 to iOS 8 (now xCode 6.1 and iOS 8), the keyboard type DecimalPad of uitextfield is not working property The decimal button is a half the size it should, and when touch on the "red rectangle", the number "7" is selected. It also warning "Can't find keyplane that supports type 8 for keyboard iPhone-Portrait-DecimalPad; using 1425143906_Portrait_iPhone-Simple-Pad_Default". I

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

How to increase the height of UINavigationBar?

人盡茶涼 提交于 2019-12-06 01:49:29
问题 Simple question: How can I increase the height of the navigation bar so that additional widgets will fit in there while keeping the blur? Examples are the Calendar app where weekday abbreviations are added to the bottom of the navigation bar... ...and in Mail when you move the mail to a different folder: 回答1: As iAnurag post ans is correct but still have some ui problem (Width is not proper) You can change size by adding category like below Sample Project Download Code #import "ViewController

Forced orientation change does not work sometimes

萝らか妹 提交于 2019-12-06 01:25:39
问题 When a certain button is pressed in my app, the view should change orientation from portrait to landscape. When the user comes back, the view controller should change back to portrait. But sometimes the orientation doesn't change or the wrong view frame is used. Here is my code -(void)btnSignClicked:(CustomSignButton *)btn { isSignButtonClicked = true; if (NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_7_0) { NSNumber *value = [NSNumber numberWithInt

Can not connect custom protocol delegate from storyboard in Xcode 6.1

大城市里の小女人 提交于 2019-12-06 01:13:11
I just upgraded my mac to 10.10 and Xcode to 6.1, found a strange thing which about storyboard, my case is using a swift project, can not connect custom protocol delegate from storyboard anymore. the old connected which comes with old version of Xcode is fine, but I can not connect any new delegate anymore. even I can not reconnect the old one once I removed the connected. Does anyone occur this situation ?? ============================== Updated ============================== View Class @objc public protocol VideoViewResizeDelegate { func shouldVideoViewResetLayout(videoView: GvVideoView) ->