ios - UIProgressView setCornerRadius working "Sometimes" -


i created uiprogressview in custom cell , added this,

[cell.progressview.layer setcornerradius:4]; 

this didn't work uiprogressview sometimes !!

i used delete line accidentally, worked wow!

how overcome situation?

thank much.

p.s.>> created custom cell (subclassed of uicollectionviewcell) named conancell, xib file.

in.h

@property (weak, nonatomic) iboutlet uiprogressview *progressview; 

in viewcontroller.m

- (uicollectionviewcell *)collectionview:(uicollectionview *)collectionview cellforitematindexpath:(nsindexpath *)indexpath {     conancell *cell = (conancell *)[collectionview dequeuereusablecellwithreuseidentifier:cellidentifier forindexpath:indexpath];     [cell.progressview setprogress:0.7];     [cell.progressview.layer setcornerradius:4]; } 

you solved issue setting corner radius like

- (uicollectionviewcell *)collectionview:(uicollectionview *)collectionview cellforitematindexpath:(nsindexpath *)indexpath {      conancell *cell = (conancell *)[collectionview dequeuereusablecellwithreuseidentifier:cellidentifier forindexpath:indexpath];     [cell.progressview setprogress:0.7];     [cell.progressview.layer setcornerradius:4];      cell.progressview.layer.maskstobounds = true;      cell.progressview.clipstobounds = true;  } 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -