Skip to content

Unable to use OHAttributedLabel in Custom table view cell label  #156

@ahadnawaz

Description

@ahadnawaz

I do have custom cell having UILabels one for text and second for translation. I want to assign attributed text to that translation label without allocating in cellForRowAtindexPath. Is there any option to do some thing like this

import <UIKit/UIKit.h>

#import <OHAttributedLabel/OHAttributedLabel.h>

@interface SelectedSurahCell : UITableViewCell
@Property (strong, nonatomic) IBOutlet OHAttributedLabel *aayat;
@Property (strong, nonatomic) IBOutlet UILabel *translation;

@EnD

and table view controller I want to do

cell.aayat = (OHAttributedLabel*)[cell.aayat viewWithTag:kAttributedLabelTag];
cell.aayat.frame = CGRectMake(0, 0, 275, height);
[cell.aayat setAttributedText: [ self AttributedString: ayatText ] ];

its doesn't set text to custom cell

Please give me any suggestion. Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions