How can I capture events from a switch in a UITableViewCell?

In Xcode 8.3.2 Swift 3.1, I have a UITableView where each row contains a label and a switch. I can manage the switches as a group (process the array), but what I would really like is to have a ValueChanged event fire in the parent UIViewController wh

iOS Swift Custom Cell NavigationController

I have CollectionView in TableView. everything ok but. when I want to navigate my cell to another viewController I got error func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath){ let storyboard = UISt

Call a function in swift correctly

I'm working on a iPhone App and have a little question. I have a function and want to call this function in my viewDidLoad-function. I have tried this way but I get an error when I want to call the dropPin-function. override func viewDidLoad() { supe

How to delete basic data values ​​in swift 2

for example here is the portion of my code that add values do { let request = NSFetchRequest(entityName: "users") let results = try context.executeFetchRequest(request) if results.count > 0 { for item in results as! [NSManagedObject] { let fN

Deinit did not call a UIViewController, but Dealloc is

It seems like the Swift equivalent of dealloc is deinit. However, when you attempt to define the method on a UIViewController, it doesn't behave as you would expect... Setup Create a new Single View project using Xcode 7.0, in either Swift or Objecti

What approach should I use when applying the tab bar

I'm started to work at new place as iOS programmer. I joined existing project and got an assignment that i don't really know how to approach. So my problem is this: when you press a button, next window has to have a tab bar with four icons, this mean

Images not displayed on Xcode 6 using Objective-C

When I try to run the program compiles and I don't receive any errors. Everything works as it should except that the image is not showing on the View Controller. Can't figure where why the image is not showing. I appreciate any inputs. Here is my cod

Detect clicks on a button in Swift

How can I detect clicks on the following UIKit element in Swift, in an Xcode 6 playground? let testLabel = UILabel(frame: CGRectMake(0, 0, 120, 40)) testLabel.text = "My Button" The UILabel class is used just to display text on the screen. Sure

get the zip code with the full API

How to get zip code with auto complete api of google in iOS? I have already tried google place api but it not return zip code So, please any one have solution give me some ideaUsing Google Maps iOS SDK Swift: @IBAction func googleMapsiOSSDKReverseGeo

Added CALayer to UITableViewCell removed after scrolling

I am trying to add a CALayer to the bottom part of my UITableViewCell to get a bit of a "shadow" effect. The problem is when the table is scrolled up and off the screen the layer is removed, so when you scroll back down it isn't visible. If you

How can I detect a faucet anywhere in the view?

I have a tutorial for my app, which should display only the first time the app is opened and should be tapped to dismiss. I am initializing a UITapGestureRecognizer in my viewDidLoad: tapper_tut = [[UITapGestureRecognizer alloc] initWithTarget:self a

Direct link to the App Store app in iOS 7

I have a free version of app. And there is a link to a full version in free app. The link works fine in iOS 6. But in iOS 7 it shows a blank page. Any help is appreciated! The link I use: - (void) getFull { [self hideAnimated]; NSString *iTunesLink =

applicationDidBecomeActive in UIViewController?

The applicationDidBecomeActive method gets called when the app became active, is there a way that I can do this method for a certain UIViewController? I know there is viewDidAppear for view controllers but I'm searching for a method that is called wh

The titanium appcelerator fails on construction

I am trying to run my app in the iPad simulator, but I keep getting this error whenever I try to simulate. I've updated everything, some fellow help for an appcelerator noob would be much appreciated. Any thoughts would help. [ERROR] : ** BUILD FAILE

Optimized for iPhone 5

I had checked some apps on iTunes, in supported devices some were showing "Optimized for iPhone 5" & in some it was normal iPhone 5. Is there is differecne between this two. How iTunes will comes to know whether app is optimized for iphone 5

How to loop in a table and gray text in UITableView

I have an array that gets created in viewWillAppear and the result in the console looks like this data SecArray........... ( ( "<NSIndexPath 0x7f17630> 2 indexes [0, 0]" ), ( "<NSIndexPath 0x7f96430> 2 indexes [1, 0]", &quo

Unable to set title on MKPinAnnotationView

I have followed this tutorial: but I can't add a title and description (see my code here are trying to set name and description as properties o

UIView drawRect (): fills everything but the polygon

I need to fill my UIView in drawRect() method with 'reverted polygon' - everything in view is filled with some color except polygon itself. I've got this code to draw a simple polygon: CGContextBeginPath(context); for(int i = 0; i < corners.count; ++

Is it a good idea to self self object with allowance

I am doing some allocation as = [[NSDictionary alloc] init]; Is it a good idea of retaining a property such like that? Or will it be better to do such as: NSDictionary *zzz = [[NSDictionary alloc] init]; = zzz; [zzz release]; My con

iOS Go to another point of view

I have a navigation based app. The root view is a list of items. From this root view you can tap on a table cell to an item's detail view. Or you can go to a form view to create a new item via the 'Add' button in the nav bar. My question is how I can