For an iOS app in Swift, I am using programmatic constraints and would like to add a CAGradientLayer() to a UIView(). Below is my code which doesn't work. import UIKit class ViewController: UIViewController { let animationView: UIView = { let view =
How can I configure Xcode to show the number of the line that caused a log to be printed? I'm seeing logs in my debugger, and I'm not sure where they're coming from.You can use built in macros: __PRETTY_FUNCTION__, __LINE__, __FILE__, and others. Obj
i've searched and read many topics that seem to have this same issue but I am unable to find any examples similar to mine. I just converted an existing project from swift 2.x (can't remember which version) to Xcode8/swift 3. The code is live in the a
I'm trying to create and use a framework in iOS. It was working previously and it works on the simulator but not a newer iPhone 6. I suspect it has to do with the script, but from what I can see (I copied the script for the internet for the most part
It may be a small issue. or I might have done something wrong but couldn't track it. please help. I have created an application and have stored the userToken and few flags in NSUserDefaults. The app was working fine till yesterday. but today when I o
How do you addTarget to a UIButton in an NSObject class? Or will that class not work? class Support: NSObject { func helpButton(viewController: ProfileVC) { let helpButton = viewController.helpButton helpButton.frame.size = CGSizeMake(35.0, 35.0) hel
I have an iOS application that sync data from a JSON restful web service. This method is called from an external class (not UI controller). This class has a sync method and It sends and retrieves data without any problem. My problem is how do I pause
This is a very specific question i got from treehouse part one: We're writing an app to fetch the most recent blog posts from the Treehouse blog. This requires making a network request using asynchronous methods that execute in the background. For th
For some reason Xcode is not archiving my project after adding AdMob to it. I am currently using -objc and -all_load in the project because I am using Adobe Creative. Its working perfectly on an iPhone 5 and simulator but when I want to archive the p
This question already has an answer here: Table view didSelectRowAtIndexPath, only works after selecting second click 1 answer So here's the thing: I implemented a UITableViewController with a custom cell.. Then i replaced the automatic segue cell to
It seems as a bug in Social framework, it won't set the initial text for Facebook service type. This is my implementation using Swift: let view = SLComposeViewController(forServiceType: SLServiceTypeFacebook) if view.setInitialText("Some text")
I'm trying to query images from Parse and I continue to run into fatal error: unexpectedly found nil while unwrapping optional value. I'm not sure if this has to do with the recent update to Swift and Xcode, so maybe it's on the Parse end or it could
I'm beginner in Objective-C, I'm struggling with this code that running in iOS 7.1 but crash in iOS 8. How I can know where is problem from stack trace? And why a code works in older version (iOS 7) and not work in newer version? Is that a problem wi
I'm using Xamarin.iOS. How can I convert UICollectionElementKindSection.Header to NSString? Error CS1503: Argument #1' cannot convertUIKit.UICollectionElementKindSection' expression to type `Foundation.NSString' (CS1503) I tried the following: UIColl
I have been reading through the documentation and looking online but have not been able to find a way of doing this. Currently, I am creating 20 tasks in a session and would like to have a way of executing some kind of callback only when all 20 tasks
i am newbie in iOS Development. i want to set tag an imageview image is equal to its value in my Array index like as my Array Contain 50 image link and i set a imageview to image code like as for(int index=0; index < [self.imagesa count]; index++) {
I have 2 ViewControllers, each of which includes a scrollview (that shows several graphs) and a tableview. I'd like to update the tableview content based on the current graph displayed in the scrollview. The scrollview is managed by a separate class
I submitted my app to the appstroe, that is approved from appstore and in ready to sale status. but i want to change primary and second category text, is it possible. please inform meNo we can't change once app approved. if you want to change that yo
I have issue in iOS 7 that does not appear in iOS 6. I have a navigation controller that is displaying another navigation controller to add an employee. This second controller is being presented modally. When I dismiss the second controller either wi
I have a ViewController in which the user selects a card (a custom UIButton) out of a UIScrollView. I have intercepted the touch event selecting the card and identified it, and then removed it from the data source, but it still exists in the UISubVie
I'm really confused. Do I have to go in the iCarousel.h file and change it there, or can I access the property in code and then reloadData?There is a delegate method you can call: - (BOOL)carouselShouldWrap:(iCarousel *)carousel { //wrap all carousel
I am posting a post on facebook. I am able to post a URL but I also want to post some description with that URL. I am using it - NSString *shareUrlString = [NSString stringWithFormat:@"http://www.facebook.com/sharer.php?u=%@&t=%@", urlString
I have 4 classes (views): A, B, C and D Class A calls B, B calls C, and C Calls D: A > B > C > D In class D I have implemented a delegate protocol and I want to catch the delegate event in class A. How can I achieve this?There are multiple ways h
I am attempting to use a button to go from one View (XIB) to another View. I'm using Xcode 4.3.2 and iOS 5. I start off by creating the project (Single View Application). I then create my button in Interface Builder, create my outlet in the header fi
I have a segmented control with 3 options to save standard/satellite/hybrid maps in the NSUserDefaults. One problem I'm having is that the segmented control changes back to the first segment whenever the mapSettingsViewController is re-visited. The o
I have a universal app which supports both orientations and all resolutions, so there are a bunch of possible splash images (iphone & ipad, portrait & landscape (left/right), retina & std display). But there is no sense to show anything except
I'm trying to put image in UITableViewCell. I use SSMessages style for my messages. Tried something like cell.imageView.image = [UIImage imageNamed:message.messageText]; but it isn't work. Any suggestions? Maybe need my other code?Use SSMessageTableV
I want to implement full text search and what I do is this: NSString* start = @"a"; NSString* stop = [start stringByAppendingString:@"zzz"]; NSArray* range = [NSArray arrayWithObjects:[NSExpression expressionForConstantValue:start],[NS
I've got your standard table application built right now. Window has a UINavigationController as its rootViewController, and that UINavigationController was initialized with its rootViewController as my custom UITableController. My applications table
I want to play multiple MP3 files, in sequence (one after the other) , using AVAudioPlayer. I tried it, and it stops after playing the first MP3. However, if I go into debugger, it works fine.. any ideas? I read somewhere AVAudioPlayer plays audio in