• Register
0 votes
525 views

Problem :

Facing following Swift issue
must register a nib or a class for the identifier or connect a prototype cell in a storyboard
6 5 3
6,930 points

1 Answer

0 votes

Solution :

You can register a class easily for your UITableViewCell as following:

Swift 3+:

self.tableView.register(UITableViewCell.self, forCellReuseIdentifier: "cell")

Swift 2.2:

self.tableView.registerClass(UITableViewCell.self, forCellReuseIdentifier: "cell")

Please make sure the same identifier "cell" is also copied at your storyboard's UITableViewCell.

The "self" is for getting the class and use the class name followed by .self.

9 7 4
38,600 points

Related questions

0 votes
1 answer 485 views
485 views
Problem : I got an error on Xcode saying that there was no information about the view controller as follows: Could not insert new outlet connection: Could not find any information for the class named Why am I getting this error?
asked Nov 28, 2019 alecxe 7.5k points
0 votes
1 answer 35 views
35 views
Problem : I am currently facing below error in my iPhone: “The maximum number of free accounts have been activated on this iPhone”. To fix this problem I even tried to erase all content and settings of the iPhone and after that set it as the fresh new iPhone. But I am still facing the above problem. How can I fix my iPhone now?
asked Feb 28 mphil 2.3k points
0 votes
1 answer 47 views
47 views
Problem: I am trying to archive my project but facing very unexpected error as shown below: Showing Recent Messages:-1: mkdir -p /Users/spritzindia/Library/Developer/Xcode/DerivedData/Contigo-atftiouzrdopcmcpprphpilawwzm/Build/Products/Debug-iphonesimulator/Contigo.app/Frameworks Showing ... : pod 'IQKeyboardManagerSwift'  pod 'SDWebImage', '~> 4.0'  pod 'KRPullLoader'  pod 'Paytm-Payments'
asked Aug 25 Raphael Pacheco 4.9k points
0 votes
1 answer 361 views
361 views
Problem : I am trying to present the view controller as the pop over if the user successfully resets their password. Basically, if all is ok with emailing the password reset instruction email then the below code will run. ... .Popover let mypopover = mynavController.popoverPresentationController popover?.delegate = self self.presentViewController(mynavController, animated: true, completion: nil)
asked Dec 27, 2019 alecxe 7.5k points