top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

In SWIFT how to assign reusable identifier for table view cell

0 votes
411 views

how to use reusable identifier for table view cell in SWIFT.
In Objective C:

static NSString *identifier = @"mainMenuCell";
    cell =[tableView dequeueReusableCellWithIdentifier:identifier];  

Then how it should be in SWIFT

posted Aug 13, 2014 by Shiva

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

To set reusable identifier you should use as like below code.

let cell: UITableViewCell = UITableViewCell(style: UITableViewCellStyle.Subtitle, reuseIdentifier: "MyTestCell")
answer Aug 13, 2014 by Raju
Similar Questions
+2 votes

I created custom view class.

import UIKit

class CustomView: UIView {

    init(frame: CGRect) {
        super.init(frame: frame)
        // Initialization code
    }

    /*
    // Only override drawRect: if you perform custom drawing.
    // An empty implementation adversely affects performance during animation.
    override func drawRect(rect: CGRect)
    {
        // Drawing code
    }
    */

}

But i don't know how to include created custom view in Storyboard because i heard that we can add custom views in storyboard design.

+1 vote

How to declare single parameter which accept multiple values.

0 votes

Is it possible to set multiple return type for function in SWIFT. If yes please provide me syntax .

0 votes

How to set return type for function in SWIFT.

+1 vote

How to set image for UIImageView in UITableViewCell Asynchronously for each cell.

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...