uiimageview - Fade in/out Image in UIIamgeView happens with no duration -


i have uiiamge created programmatically in viewdidload of detailviewcontroller. .transitioncrossdissolve between current image image. problem once detailviewcontroller displayed switch happens right away no matter duration. never see first image. using following code.

    let rect = cgrect(x: 0, y: uiapplication.shared.statusbarframe.height, width: view.frame.size.width, height: view.frame.size.height / 3.0)     let imageview = uiimageview(frame: rect)     imageview.image = #imageliteral(resourcename: "head1")     imageview.contentmode = .scaleaspectfill     imageview.clipstobounds = true     view.addsubview(imageview)     uiview.transition(with: imageview,                       duration: 16.0,                       options: .transitioncrossdissolve,                       animations: { imageview.image = #imageliteral(resourcename: "head3") },                       completion: nil) 

try start animation in viewdidappear delegate. think thats problem.


Comments

Popular posts from this blog

.net - Generate assembly with Roslyn -

typescript - Disable a button based on text field values in angular 2 -

batch file - filebot superstrict script: need tiny video sample or other solution -