FAQ Database Discussion Community


Error after update to Swift 1.2

ios,xcode,swift,ios8,xcode6.3.2
I updated shortly to Swift 1.2 which comes with Xcode 6.3.2 and wrote a few lines of code: let originView:UIView! override init() { super.init() } init(sourceView:UIView, menuItems:Array<String>){ super.init() originView = sourceView } This code runs perfect till I updated the new version of Xcode (6.3.2). Now I get the following...

iOS8 CLLocationManager returns Null in Background State

ios,ios8,cllocationmanager
in iOS8 when i m putting my app in back ground the CLLocationManager returns Null in location ,i have also unable Location updates in Background Modes and also do requestAlwaysAuthorization CLLocationManager *lm = [[CLLocationManager alloc] init]; lm.delegate = self; lm.desiredAccuracy = kCLLocationAccuracyBest; lm.distanceFilter = kCLDistanceFilterNone; [lm requestAlwaysAuthorization]; [lm startUpdatingLocation]; ...

Getting error while installing pods for existing project

objective-c,ios8,cocoapods
I am getting below error while installing pods for existing project. [!] Unable to find targets named 'Project-Tests' to link with target definition 'Project-Tests' Can anyone help me here? Thanks in advance! ...

UISearchController: show results even when search bar is empty

ios,iphone,ios8,uisearchcontroller
As I understand, the default behaviour of UISearchController is: On tapping search bar, background is dimmed and 'cancel' button is shown. SearchResultsController is not shown till this point. SearchResultsController is displayed only if search bar is not empty. I want to display SearchResultsController even when search bar is empty but...

Fatal error when unwrapping CLLocation Location Coordinate

ios,iphone,swift,ios8,optional
I currently have a test application to teach myself Core Location. It is an app with a button which will either show your location when you press a button, or an alert when location services are off. I get a fatal error (unexpectedly found nil when unwrapping option value) When...

Opening and closing form animation

ios,ios8,core-animation,ios-animations
Is this animation possible in iOS, any third party API's for that? ...

poptorootviewcontroller and instruct rootviewcontroller to perform some action

ios,swift,ios8
I have a navigationcontroller, and under that I have controller A as rootviewcontroller and controller B is linked to A through a default push segue. What I want to do is to when some action is pressed in B, I will ask the navigation controller to pop to rootviewcontroller, which...

Device Tocken will Change after install from diawi or TestFlight? So Push notification is not coming

objective-c,xcode,ios8,push-notification,testflight
I'm currently creating an app that needs to receive push notifications from a server. When I got the device token, I send it to my server and save it into DB, My question is: When I tried to normally install application on device from XCode, I got the correct device...

iOS App Extension has PFUser currentUser set to nil

ios,parse.com,ios8,ios-app-extension
I have a Parse-enabled iOS 8 app and I'm trying to enable Share Extension. I've done exactly what it says at https://www.parse.com/docs/ios/guide#extensions but in my app extension, [PFUser currentUser] is set to nil (while it is not nil in my app), and [PFInstallation currentInstallation] is set to a new instance...

Shuffle NSArray

ios8,nsarray
I got an NSMutableArray with a rather small number of objects that varies from 1 to max 20. When user taps a button I want to select one random object and display it. I've tried shuffling the array: srandom(time(NULL)); for (NSInteger x = 0; x < [array count]; x++) {...

One storyboard not seeing localization .strings while the other one localizes perfectly

ios,ios8,localization,xcode6,xcode6.3
I have two storyboards in my app, and I'm trying to add Turkish language option to both using localizable strings. My main storyboard maps just fine; when I change simulator language to Turkish, it loads the Turkish strings and displays them perfectly. However, my other storyboard still displays in English....

create a popup window with just a textview/string and a button SWIFT ios 8

iphone,swift,ios8,popup,xcode6
I am very new to ios 8 and swift but I have not found a way to make a simple popup window whenever a button is pushed. I payed for tutorials and they still don't cover it. All i would like is for when the user pushes a button (the...

how to hide the section title when clicked search bar using ios 8 UISearchController?

ios8,uisearchcontroller
This is the previous screen. Then, I clicked the search bar: Code is below: // MARK: - searchController func initSearchController() { self.resultSearchController = ({ let controller = UISearchController(searchResultsController: nil) controller.searchResultsUpdater = self controller.dimsBackgroundDuringPresentation = false controller.searchBar.sizeToFit() controller.searchBar.backgroundColor = UIColor.clearColor() self.tableView.tableHeaderView = controller.searchBar return controller })() } Please help me....

Swift: rotate oblique a button in iOS8?

ios,swift,button,ios8,rotatetransform
Let's say I have one or more 100*50 rectangular buttons on my ViewController. import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can...

How do I set the UISearchController's searchBar to a view that isn't the tableHeaderView or navigationItem.titleview?

ios,swift,ios8,uisearchbar,uisearchcontroller
I'm trying to keep the search bar in view as the table scrolls. At the moment I'm placing it as the header in a tableview, and it works as it should, but of course the search bar scrolls off screen as you go down the table. I thought I could...

Remove mask from deselected tabs UITabBarItem Swift

ios,swift,ios8,uitabbarcontroller,uitabbaritem
I am trying to implement an UITabBarController with 2 UITabBarItems . I added in storyboard the TabBarController. I almost did it, but still I am blocked with 2 important issues: 1) Here is how tab bar should look: Please ignore orange button, that is not a tabItem. So I put...

iOS 8 Autolayout - Visual Format Language how to add constraint to superview's edge

ios,swift,ios8,autolayout,nslayoutconstraint
Can I pin my view to my superView's edge instead of its layout margin through VFL? Can I be even flexible to toggle "Relative to margin" on myView as well? NO VFL (this is what I want to achieve with Visual Format Language): var constraintLeft = NSLayoutConstraint(item: myView, attribute: NSLayoutAttribute.Left,...

Move UIToolbar with keyboard iOS8

xcode,ios8,uitoolbar
I have a UIToolbar at the bottom of my ViewController that is inherited from the self.navigationController. I show it in my ViewController in the viewWillAppear: method using this code: [self.navigationController setToolbarHidden:NO animated:NO]; self.navigationController.toolbar.backgroundColor = [UIColor blackColor]; self.navigationController.toolbar.tintColor = [UIColor blackColor]; self.navigationController.toolbar.barStyle = UIBarStyleBlackOpaque; After that, my ViewController has both programmatically...

Is it possible to auto-dial in background on iOS?

ios,objective-c,ios8
Is it possible to make calls programmatically in background on iOS? I have been using this code to make calls in my app: NSString *phoneNumber = [@"tel://"stringByAppendingString:mymobileNO.titleLabel.text]; [[UIApplication sharedApplication] openURL:[NSURL URLWithString:phoneNumber]]; ...

How do I compare the value of password stored in CoreData with user input?

swift,core-data,ios8,xcode6
This is the code for login page where I want to compare input with stored data. import UIKit import CoreData class ViewController: UIViewController { @IBOutlet weak var userName: UITextField! @IBOutlet weak var passwordText: UITextField! @IBAction func login(sender: AnyObject) { var appdel : AppDelegate = (UIApplication.sharedApplication().delegate as! AppDelegate) var context :...

Blur Effect on TableViewCell when scroll

ios,objective-c,uitableview,ios8,uiimageview
Right now I'm using LBBlurredImage to blur an image, but I want to change to iOS8's UIVisualEffectView to blur instead. I'm having a hard time implementing, any ideas? Implemented with LBBLurredImage: - (void)updateData { // Set up Screen self.screenHeight = [UIScreen mainScreen].bounds.size.height; //UIImage *background = [UIImage imageNamed:@"gray"]; UIImage *background =...

Static tableview cell stays highlighted when returning from different scene

ios,swift,ios8,interface-builder
I have a uiviewcontroller with a container on it, embedded inside of that is a uitableviewcontroller that has static cells and static content. When I tap the cell "Trip Info" it segues to the Trip Info View Controller. When coming back the static cell is highlighted. I have seen many...

Why does didUpdateLocations: only have one location after locationManagerDidResumeLocationUpdates:

ios8,cllocationmanager
I have location services working in iOS8. It is set for kCLLocationAccuracyBest using startMonitoringSignificantLocationChanges to restart when in the background and startUpdatingLocation for accuracy. When I set pausesLocationUpdatesAutomatically = YES, the location services get paused and resumed as expected. However, the following call to didUpdateLocations: only has one location in...

Using the device simulator for iOS 8 with Xcode 7

ios8,xcode7,ios9
I thinking about port my App to Swift 2 and Xcode 7. But the device simulator only targets iOS 9 and I see no way to download iOS 8. I have parallel Xcode 6.3 installed. Is there any way to test and debug my app under iOS 8 with the...

What does this auto layout error mean?

ios7,ios8,autolayout
I recently was trying to making my IOS 8 app built, with swift, become compatible with IOS 7 devices, but I've been running into some minor issues. I've fixed most of them, but I can't seem to find this error on the web or anything close to it. Can anyone...

Custom init in Swift Class giving 'property not initialized at implicitly generated super.init call' error?

ios,swift,ios8
I'm trying to make a simple class to be used as the annotations for my MKMapView. I'm fetching data that i want to parse into these annotation objects, and figure it would be a good idea to initialize an annotation with a dictionary, and do all the parsing in this...

Why is boundingRectWithSize wrong when using UIFont preferredFontForTextStyle?

ios8,nsstring,uilabel,uifont
I have found that a call to boundingRectWithSize is extremely incorrect, missing an entire additional line, when called with NSFontAttributeName : [UIFont preferredFontForTextStyle:UIFontTextStyleBody]. However, using the font [UIFont fontWithName:@"Helvetica Neue" size:17.f], it is just fine. Here is test code showing the bug: - (void)viewDidLoad { [super viewDidLoad]; NSString *measureText =...

how I get the index of an array with a NSDictionary for key in swift?

swift,ios8
I have this array: var cars : NSArray = [ ["name":"Dayatona", "marca":"Dodge","ano":"1969"],["name":"Viper", "marca":"Dodge","ano":"1969"],["name":"F344", "marca":"Dodge","ano":"1969"],["name":"Dayatona", "marca":"Dodge","ano":"1969"],["name":"Cobra", "marca":"Dodge","ano":"1969"],["name":"Dayatona", "marca":"Dodge","ano":"1969"],["name":"GT500", "marca":"Dodge","ano":"1969"] ] i need to get the "name" of each item here: func configureCell(cell: UITableViewCell, atIndexPath indexPath: NSIndexPath){ cell.textLabel?.text =...

Presenting a view controller triggers UIApplicationDidChangeStatusBarOrientationNotification

ios,objective-c,iphone,ios7,ios8
I've got a universal app that supports both iPad and iPhone, and on the iPhone it supports UIInterfaceOrientationPortraitUpsideDown. When I run the app on an iPhone, then rotate the device to UIInterfaceOrientationPortraitUpsideDown, then modally present a view controller like this: UIViewController* vc = [[UIViewController alloc] initWithNibName:nil bundle:nil]; UINavigationController* navigationController =...

Restrict app for iPhone devices lower than iPhone 5 with iOS 8 or 7 in AppStore

iphone,ios8,app-store
I planned to develop application with targeted devices iPhone 5/5S, iPhone 6/6+ . I don't want my application to be runnable on iPhone 4S. Can i able to achieve that? I googled some sites , they were mentioned that we can restrict older version mobiles like iPhone 3GS using front...

Swift - Issue trying to access to Singleton object

swift,design-patterns,ios8,singleton,apple
This is my first question on StackOverflow, I'll try to be specific. I am trying to implement the Singleton pattern on my app, without success so far. When I try to access to my Singleton, it seems that the program is not accessing the real singleton, but a copy of...

Change height of scope buttons of UISearchBar in iOS?

ios,swift,ios8,uisearchbar
I would like to change the height of the scope buttons for my search bar. I am using adjusted segmented controls and would like to make the scope buttons the same look. Below is a screenshot of my scope buttons and another screenshot of my segmented controls that I would...

Completion handler for property in swift

objective-c,ios8,completionhandler
I'm trying to use a control called MZFormSheetController in swift. In the example given it provides a property as a completion handler, if I understand correctly, but I'm having difficulties translating it in Swift. Any help would be appreciated. This is in the obj-c example. controller.didPresentContentViewControllerHandler = ^(UIViewController *content) {...

Auto Rotation iOS 8 Navigation Controller

objective-c,iphone,ios8,uinavigationcontroller,autorotate
I have certain viewControllers which are managed by a UINavigationController (push and pop). I want to restrict different viewControllers to different orientations like the first one should be only in Portrait, second in portrait, third in landscape and fourth can be portrait and landscape both. I set a ViewController on...

Can't setup VPN connection using Network Extension Framework iOS 8 in Swift

ios,swift,ios8,vpn,keychain
So I've been trying to use the iOS 8 Network Extension Framework to setup a VPN connection when the users presses a UIButton. I've used the following tutorial: http://ramezanpour.net/post/2014/08/03/configure-and-manage-vpn-connections-programmatically-in-ios-8/ But for some reason it keeps asking for the vpn password and shared secret. Even though I set the passwordReference and...

View Controller loading from storyboard taking too much time

ios,objective-c,iphone,ios8
In my application, I am having 5 viewControllers. In which I have 4 web services call. While going from 4th controller to 5th controller, there is no web service, Still taking so much time to load. What could be the possible possible reasons? My observation : View controller is coming...

How to add directions among two custom locations in Mapview for IOS 7 (objective c)

objective-c,ios7,ios8,mkmapview
I have to add directions among two custom locations in IOS 7. Any one tell me please. Thanks. ...

“My location button” in google map disappeared

ios,objective-c,google-maps,ios8
I'am trying to add a view to google map which both have been created using the storyboard. In order to do this, I've changed this part of the code: mapView = [GMSMapView mapWithFrame:CGRectZero camera:camera]; to this: mapView = [GMSMapView mapWithFrame:self.view.bounds camera:camera]; self.mapView.myLocationEnabled = YES; [self.view insertSubview:mapView atIndex:0]; it works, but...

Unable to edit screenshots, performChanges block fails

ios,ios8,nsdata,cgimage,photokit
I'm developing an app that allows users to edit photos using PhotoKit. I was previously saving the edited photo to disk as a JPEG. I would like to avoid converting to JPEG and have implemented the modifications in order to do that. It works great for photos taken with the...

How to query an PFFile By Creation Date

ios,swift,parse.com,ios8,uiimage
I am using this code to retrieve images from Parse data... if let userPicture = object.valueForKey("Image") as? PFFile { userPicture.getDataInBackgroundWithBlock({ (imageData: NSData?, error: NSError?) -> Void in if (error == nil) { let image = UIImage(data:imageData!) self.ImageArray.insert(image!, atIndex: 0) } else { self.alert("Error: \(error!) \(error!.userInfo!)", Message: "Make sure you have...

Why tableview's delegate method heightForRowAtIndexPath: executes one more time?

ios,uitableview,ios8
my platform is ios8 and xcode 6.3.1 tableview's delegate like this: - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 3; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return 1; } so, the delegate of heightForRowAtIndexPath: should be execute three times , but my code execute four, why ? My code : init tableView -...

Bluemix authentication ios8 with google and facebook

facebook,authentication,ios8,bluemix,google-authentication
I am trying to implement two types of authentication from an iOS8 device in the bluemix platform. I succeeded in adding one type of authentication: google. I am using a ADVANCED MOBILE ACCESS module, and I am at the User Authentication part. It looks from a dashboard like I can...

NSItemProvider loadItemForTypeIdentifier:options:completionHandler: for any kind of (binary) file

ios8,ios-app-extension,uti,ios8-share-extension
I am implementing iOS Share Extension for my app, and I want to be able to get any kind of file into my app extension (e.g. a binary file of any type shared from Dropbox). How can I achieve this behavior? loadItemForTypeIdentifier:options:completionHandler: expects a UTI, I've tried providing an empty...

UI Local Notification - Background Reschedule

xcode,swift,ios8,uilocalnotification
I'm learning to develop application for ios with swift, and I'm one doubts, already googled and i not found. I'm creating a to-do list app, and was wondering if there is a way to reschedule a notification when it appears to the user For example the user registers a task...

Save locally generated PDF to app's documents folder in iOS8

pdf,ios8,uiwebview,nsdocumentdirectory,writetofile
It would seem that my apps no longer are able to save files to their documents folder when doing this: NSString *path = [documentsDirectory stringByAppendingPathComponent:fileName]; NSData *dta = [[NSData alloc] init]; dta = [NSData dataWithContentsOfFile:path]; NSLog(@"writing file: %@", path); if ([dta writeToFile:path options:NSAtomicWrite error:nil] == NO) { NSLog(@"writeToFile error"); }else...

iOS 8 Swift 1.2 and Parse - Attempt to present UIAlertController on ViewController whose view is not in the window hierarchy

ios,objective-c,swift,parse.com,ios8
There are many questions on Stack concerning this issue, but none of them seem to solve the issue I'm having. I am using ParseUI for the login and signup portion of my application. What I would like to have happen is for a UIAlertController to be presented when a user...

App is not showing in the share menu of shared options in shared extension in iOS8

ios,ios8,ios-app-extension,ios8.3,ios8-share-extension
I'm developing share extension for my app. Every thing is fine, but i'm facing one main problem, my app is not in the share menu while sharing from photos app. Below is the plist of my shared extension. It's not showing in the list, below is the screenshot: But when...

iOS 8 crash - objc_msgSend() selector name: respondsToSelector:

ios8,objc-message-send
I have the following crash report. It only happens on iOS 8. I know exactly how to reproduce it but cannot for the life of me figure out where the problem is in my code. When I use a breakpoint and try to step through the app, the crash doesn't...

Hide/show sections in UICollectionView from code (swift)

swift,ios8,uicollectionview
I am new to iOS development and developing my first app for iOS 8, XCode 6.3, Swift 1.2. I have a small problem with hiding and showing sections in the UICollectionView. So I have a main ViewController.swift, SettingsViewController.swift. My task is to hide/show sections, one switch control for every section...

Showing leaderboard crashes app because showViewController isn't supported

ios,swift,ios7,ios8,game-center-leaderboard
What is the right way to present Game Center leaderboards in iOS 7? The code below crashes on showViewController because it only supports iOS 8. Other Stack Overflow posts suggest using presentViewController for iOS 7, but that only shows a blank leaderboard. func showLeaderboards() { // User logged into GameCenter?...

How to customize GIDSignInButton login Image in new Google+ iOS SDK?

ios,objective-c,swift,ios8,google-plus
In order to connect to google plus in my iOS app i'm using GIDSignInButton from latest Google Plus SDK for iOS. I want to use my own image and label for login button. The problem is I don't see anywhere how to customize it. I am able to do it...

How to i create new arrays using swift?

ios,arrays,swift,ios8
I'm not exactly sure what I am looking for, so I'm just going to give you an example... Inside App Lets say I am making a shopping list app. In the app, you can create as many shopping lists as you like, and in those shopping lists, you can add...

Presenting ViewController Z-Index Issue

ios,objective-c,iphone,model-view-controller,ios8
So my app is laid out in the following format. There is a rootVC on the Window. Then i have another viewController (lets call it PlayerVC), which has 2 views, and i've added the second view as a subview to the window. Now i am trying to present a UIAlertController...

canEvaluatePolicy Extra argument 'error' in call Swift Xcode 7

ios,xcode,ios8,xcode7
I work with Xcode 7 with swift and I would use the Touch Id. Only I have a error when I use canEvaluatePolicy. I understand my error, I call an argument too. Only if I do not call, it makes me a error because I did not manage my error...

Setting “AppleLanguages” doesn't change app language

ios,swift,ios8
I am trying to implement a function that can change app language. I tried to set it like this: let defaults = NSUserDefaults.standardUserDefaults() defaults.setObject("de", forKey: "AppleLanguages") And after app restart language is still 'system default'. Now I test different languages by setting Scheme > Application Language > language. But is...

Two scenes sharing a different scene wont segue

swift,ios8,storyboard,interface-builder,scene
So I have two different scenes in my storyboard and they both have a tableview cell that segues to a date picker scene. The first scene I built a segue from to the date picker scene works and also has an unwind segue. The second scene's segue wont fire when...

Wikitude does not work. Poi do not change the position on phone position change

ios,objective-c,ios8,augmented-reality,wikitude
I am trying to integrate AR poi view with Wikitude in my app. As html I used a file from the example 4_PointOfInterest_4_SelectingPois. It should render a few point around my location. It does it, but all points stay in the same position all the time, although I changed my...

Collection View automatically handles large amounts of records?

ios,swift,core-data,ios8,uicollectionview
I have a variable that holds a collection of records from Core Data. Sometimes it can be thousands of records. If I feed this variable into a collection view, does it automatically handle large amount? What I am hoping is that the collection is lazy loaded into the variable from...

A Plugin to view PDF document in iOS cordova based application

ios,iphone,ios8,phonegap-plugins,cordova-plugins
Can please suggest a working plugin to view PDF in iOS Cordova based application. I have tried many of PDF related plugins: https://github.com/siegfriedbolz/cordova-plugin-file-opener2.git https://github.com/RandyMcMillan/PDFViewer but of no use..My application stopped at loading. Lastly with I have tried with pebois/phonegap-plugin-PDFViewer: I have installed using : "cordova plugin add com.lesfrancschatons.cordova.plugins.pdfreader" In index.html:...

iOS 8: unicode of death, how does it work?

ios,iphone,ios8,apple,malware
Once sent by message to an iPhone, the victim's device will turn off. (I was skeptical about it but I tried it and the code worked.) This is the an image of the message from Cult of Mac: Can someone tell me how does it work and why?...

Showing MapKit “Map loading error” in Objective C

ios,objective-c,iphone,ipad,ios8
I am using Mapkit using objective c, i want to show "Error alert" on map. When Internet working, its working fine but When Internet not working properly then its showing automatically on log "request time out" with out calling "mapViewDidFailLoadingMap" delegate method. Code Here: - (void)viewDidLoad { [super viewDidLoad]; //...

Not showing coredata framework in linked frameworks and libraries in Xcode 6.3

objective-c,ios8
I am trying to add CoreData.Framework to my application but it is not showing in in linked frameworks and libraries. please some one help me to get coreDta back to my Xcode 6.3

How to add shadow to a GMSMarker?

ios,ios8,google-maps-sdk-ios
I'm trying to add some shadow to the markers on my GMSMapView but configuring the shadow properties of GMSMarkerLayer does not appear to have any effect. GMSMarker *marker = [[GMSMarker alloc] init]; [marker setMap:self.mapView]; marker.snippet = @"Description"; marker.title = @"Title"; marker.position = busData.location.coordinate; marker.icon = [UIImage imageNamed:@"BusMarker"]; marker.layer.shadowOpacity = 0.7;...

SpriteKit SKCropNode Masks everything

objective-c,ios8,sprite-kit,mask,skcropnode
I am trying to mask a node with SKCropNode class. I am doing it with my own init method in SKCropNode inherited class: - (id)init { self = [super init]; if (self) { self.maskNode = [[SKSpriteNode alloc] initWithColor:[SKColor blackColor] size:(CGSize){50,50}]; SKSpriteNode *contentNode = [[SKSpriteNode alloc] initWithImageNamed:@"Spaceship"]; [self addChild: contentNode]; self.userInteractionEnabled...

delay showing UIMapView until map fully loaded in Swift

swift,ios8,mkmapview
On my story board, I have set up a timer (which updates every 0.01 seconds) and a UIMapView which displays the user's location when the view controller is loaded. However, when this screen loads, the timer lags for a bit until the map is fully loaded. I assume this is...

Draw attention to and foster discovery of actionable controls

ios,ios8,uibutton
In an attempt to defer to content, I chose not to use any (navigation or tool) bars. The app has a tinted UIButton which brings up an action sheet (where the user could share the content, and adjust preferences). What I've seen is that people don't interact with the button....

How to make text appear in centre of the image?

swift,ios8,uiimageview,uiimage,uigraphicscontext
I want to add a text on an image, and I'm able to do it as shown in below code. func textToImage(drawText: NSString, inImage: UIImage, atPoint:CGPoint)->UIImage{ // Setup the font specific variables var textColor: UIColor = UIColor.redColor() var textFont: UIFont = UIFont(name: "AmericanTypewriter", size: 75)! let textStyle = NSTextEffectLetterpressStyle //Setup...

UICollectionView cell height/scrollable content behaving strange/incorrect

ios,ios8,autolayout,uicollectionview,uicollectionviewcell
I'm trying to make UICollectionView work like UITableView (I want the extra flexibility of collection view instead of just going with table view, both for some current and possible future feature extensions); having a fixed width (screen width) and dynamic cell height (just like iOS 8's new table view feature)....

How to make uiscrollview only vertical scrolling for ios?

ios,objective-c,ios8,uiscrollview,autolayout
I'm trying to make layout inside scrollview using this one tutorial https://www.youtube.com/watch?v=UnQsFlMGDsI And get the following result http://youtu.be/iPfzyLbEZMA It will be appreciated for any advices or tutorial links. It needs only vertical scrolling...

Pass data from one view controller to the next WITHOUT a segue in swift

iphone,swift,uiviewcontroller,ios8,segue
So I have an app that where you choose a button in the first screen it will bring you to another screen depending on which one you chose on the first one. Because I have these possible different layouts I can't just use a segue from one button to the...

Better character movement according to touch location

objective-c,ios8,sprite-kit
I have a character spawned in the middle of a 3 by 3 platform (orthogonal & 2D sprite game). The platform is made up of 9 tiles. The character needs to move up if the touch is above him, left if touch is left of him and so forth. He...

iOS handoff from phone to macbook safari/chrome

ios,objective-c,ios8,handoff
I want to send a URL from my app to open on a laptop web browser using handoff. I have added the activity type to my app's NSUserActivityTypes. here is my code so far: - (void)startHandoff { NSUserActivity *activity = [[NSUserActivity alloc] initWithActivityType:@"com.me.browse"]; activity.webpageURL = [NSURL URLWithString:_wakeUrl]; [activity becomeCurrent]; }...

displaysSearchBarInNavigationBar deprecated in iOS8

ios,swift,ios8,uisearchbardisplaycontrol
I'm trying to find an alternative to displaysSearchBarInNavigationBar for iOs8, is there anything I can use (in swift)? I tried self.navigationItem.titleView = resultSearchController.searchBar but it doesn't do anything. I don't understand how to find the replacement for functions that are deprecated, on the apple documentation it just say deprecated with...

IndexPath for Selected Cell UICollectionView

ios8,uicollectionview,nsindexpath
I'm currently working on a UICollectionView showing various cells ... So far so good, but I have problems with the selection of the cell ... For example, I implemented the method of selection like this: - (Void)collectionView:(UICollectionView *) collectionView didSelectItemAtIndexPath:(NSIndexPath *) indexPath {      UICollectionViewCell theCell * = (UICollectionViewCell *)...

iOS 8 simulators not visible in XCode 7 beta

ios8,xcode7
I'm using the XCode 7 beta that Apple released during WWDC2015, and it looks like iOS8 simulators are not there in it. I tried downloading them using the Xcode > Preferences > Downloads > Components, but it doesn't list the simulators. I have Xcode 6.3.2 also on the mac, and...

Image inside html in UIWebview not fit properly

iphone,ios8,uiwebview,xcode6
I want to show google updates ,webpages are responsive but image width is not showing properly and go out of the boundary. Here is content of webpage. <div dir="ltr" style="text-align: left;" trbidi="on"><span id="docs-internal-guid-489c1670-b0dc-d32d-645e-eaf6ca555069"><span style="font-family: Verdana; font-size: 13.3333333333333px; font-weight: bold; vertical-align: baseline; white-space: pre-wrap;"><img alt="whats_new_doc_header_may2015LL.gif" height="112px;"...

Weird crash while navigating back

ios,objective-c,ios8
My app crashes randomly when navigating back in a NavigationController. Here is what I know: It happens randomly (sometimes, I can come back once or twice and if I reload the viewController and press "back" again it will crash) It happens even with an empty ViewController (I tried to comment...

Getting error in Adjust library, Integrated with Pods

objective-c,ios8,cocoapods
I am getting this error: ld: library not found for -lPods-Adjust clang: error: linker command failed with exit code 1 (use -v to see invocation) I added this to my Podfile: pod 'Adjust', :git => 'git://github.com/adjust/ios_sdk.git', :tag => 'v4.2.5' I have installed pods successfully, but still get the above error....

IOS8 Autolayout with relative width / height

ios8,storyboard,autolayout,constraints,orientation
I need to autolayout a storyboard UIView with a single UIControl. The UIControl should be centered, needs to have a aspect ratio of 1:1 and should always use 90% of the superviews width or height depending on the device orientation without clipping. I added 4 constraints Center Y Alignment -...

Cannot invoke 'canEvaluatePolicy' with an argument list of type '(LAPolicy)' Swift2.0 Xcode 7

ios,swift,ios8
I have a problem with canEvaluatePolicy function. I have declared this function like this : func canEvaluatePolicy(policy: LAPolicy) { do { try authenticationObject.canEvaluatePolicy(.DeviceOwnerAuthenticationWithBiometrics) } catch let error as NSError { print("Error: \(error.domain)") } } But when I want to use it like this: if authenticationObject.canEvaluatePolicy(LAPolicy.DeviceOwnerAuthenticationWithBiometrics) { I have an error:...

UILabel text isn't updated when modal re-appears

ios,iphone,swift,ios8
I've created a reusable modal UIView as a singleton object, but am having trouble changing the text of a label it contains. When the modal appears a second time, the new text appears over the old text. I'm guessing this is due to the fact that the label is only...

Switch between views using a Tabbar

ios,xcode,swift,ios8
I have an iOS application with a Tab Bar, and two subview. My first view is a Table View. So, I want to switch to the second view when I click on a cell of the first view, and keep the TabBar visible. When I do that using "Show" segue...

How to disable the Copy/Hide feature in UIImagePickerController when long pressing a image …?

ios,swift,ios8,uiimagepickercontroller,ios8.3
- Actually am using UIImagePickerController for my usecase,and if i long press any picture ,it shows Copy/Hide option (as shown in the sample image) - I dont want the Copy/Hide feature. Guide me with some suggestions if u too have encountered :)... Thanks in advance...iOS Geeks...PLZ refer my code snippet...

Test-Flight App beta testing time limitations

ios,iphone,ipad,ios8,testflight
I need to submit my binary files over the air without pushing app to app-store. one solution is using enterprise program, Test-Flight App Beta Testing we can send binary files to external users to limit of 1000. My Questions is : will apple take beta review (following apple guidelines) of...

Core Location and UITableView performance issues in iOS 8

objective-c,uitableview,google-maps,ios8,core-location
I have a view controller that contains two views: a map view using the Google Maps API and a UITableView. The view controller fetches a list of location objects from Google Maps within a certain radius of a particular location and plots them on the map view as markers and...

Add correctly positioned layers to context

ios,iphone,swift,ios8
I'm trying to add two CALayers from a UIImageView and UITextField to a context, then create an image from the context using UIGraphicsGetImageFromCurrentImageContext(), however, I can't seem to position the text field correctly. I'd like the resulting image to match the view in which the image and text field originally...

Xcode remove cell with animation programmatically

ios,objective-c,xcode,uitableview,ios8
Hi i have been searching around to find a way to remove a static cell with animation but i have not found a solution to the problem. I have also tried: [tableView deleteRowsAtIndexPaths:[self.taskArray objectAtIndex:indexPath.row] withRowAnimation:UITableViewRowAnimationFade]; but no success. ...

Swipe up to show button in UITableView?

ios,swift,uitableview,ios8,uicollectionview
I'd like to place a button at the top of a UITableView or UICollectionView, but only shown when swiped up beyond the first row. Usually you see scroll to refresh or a search bar there, but I'd like to put a button there for another functionality. How can I do...

UITextView inside UICollectionViewCell insists on growing horizontally

ios,ios8,autolayout,uicollectionview,uicollectionviewcell
I have a UITextView inside my UICollectionView cell, and it keeps getting growing horizontally depending on its content. My collection view is set to be vertically scrolling, and the cells calculate their own size. I want my text view to grow vertically depending on its contents, not horizontally. Here is...

Parse.com Framework Sort Date Next Birthday

ios,swift,parse.com,ios8
Need to sort on iOS by date using Parse.com but I need to order them based on the next birthday for a specific person. I tried to add the day and month with the current or next year and that helped but that will be a manual process, any recommendations...

View set as inputAccessoryView throws exception when added back into normal view

ios,ios8,uikeyboard,inputaccessoryview
I have a text view, some decorations etc. in a view and I want that view to dock on keyboard, just like any other messaging app. When I'm about to display my text view, here is how I attach my view to the keyboard: -(BOOL)textViewShouldBeginEditing:(UITextView *)textView{ UIView *inputView = self.textInputView;...

Can an app with deployment target iOS 8.3 run on iOS 8.2?

ios,iphone,xcode,ios8,ios8.3
I am about to release my first app. In Xcode, I set the deployment target as 8.3. When testing my app with third party testing platform, it looks like my app can't been installed on a device running iOS 8.2. So I have the following questions about the iOS compatibility:...

Swift IAP localized price

swift,ios8,in-app-purchase
I am trying to add localised prices via labels to my shop section of my game. I am struggling to get it to work. This is 1 part of the code for the purchase bit, its pretty standard. func paymentQueue(queue: SKPaymentQueue!, updatedTransactions transactions: [AnyObject]!) { println("add payment") for transaction:AnyObject in...

How to determine, in an app with several ViewControllers attached to NavigationControllers, what the currently displayed View is?

objective-c,uiviewcontroller,ios8,uinavigationcontroller,uitabbarcontroller
I have an iOS 8 app, built with Objective-C, with a TabBarController, with 3 tabs. Each Tab links to a NavigationController (so there are 3 NavigationControllers), and each NavigationController has a stack with several ViewControllers in it. So, at any given time, the app's user can be on, say, ViewController...

When creating new tableView entry the constraints don't work

uitableview,ios8,nslayoutconstraint
I have a Master-Detail application that uses CoreData. Everything is hooked up fine and works as expected. There is just one problem with the display when adding a new entry. On the left is the Master's TableView with the entries and on the right is the Detail's View, where the...

Cannot subscript a value of type [CLPlacemark] with an index type int

ios,xcode,swift,ios8,xcode7
I would like to retrieve the current location. I work with on swift Xcode 7. I looked PLUSIEUR tutorials, but every time they use the same method. Here is my code and my error: ! Error : Cannot subscript a value of type [CLPlacemark] with an index type int import...

Remove “heightForRowAtIndexPath” for iOS8

ios,ios7,ios8,deprecated,heightforrowatindexpath
I'm trying to solve this problem for two days before finding the solution. Here it is. ====== Hi everyone, I actually manage the height of my tableViewCell in iOS7 with the delegate method heightForRowAtIndexPath: Now, in iOS8 I use the property tableView.rowHeight = UITableViewAutomaticDimension with autolayout and it works great...

UITableview with more than One Custom Cells with Swift

swift,uitableview,ios8,xcode6
As absolute beginner I have to ask those questions: I want to use a UItableview with different custom TableviewCells. One Cell should have an image and a label. Another cell should have two label. A third cell should have a dayPicker. I don't have to create Tage cell in the...

Autolayout works great on iOS 8, crashes on iOS 7

ios,ios7,ios8,autolayout
I have an issue where a screen with autolayout that works great on iOS 8 - but crashes on iOS 7. All subviews are configured in the XIB. The error message is: Terminating app due to uncaught exception 'NSGenericException', reason: 'Unable to install constraint on view. Does the constraint reference...

Crash while fetching the all contacts from addressbook

ios,objective-c,ios8,addressbook
I am fetching all the contacts from address-book and uploading those to server. But sometime it crashes on ABRecordCopyValue(person,kABPersonCompositeNameFormatFirstNameFirst) I am not able to find the scenario and the reason of crash. It doesn't crash every time. +(NSArray *)getAllContacts { CFErrorRef *error = nil; ABAddressBookRef addressBook = ABAddressBookCreateWithOptions(NULL, error); __block...