ios - NSImageView ClipsToBounds -


i have ios app uses code below. creating app mac os x , same effect not seem able use clipstobounds. should using? have rest of code working on mac, not part. thanks

var myimage = uiimage()                    let view = uiimageview(frame: cgrectmake(0, 0, 100, 100))                view.contentmode = uiviewcontentmode.scaleaspectfill view.layer.opacity = opacity view.layer.cornerradius = cornerradius view.clipstobounds = true view.image = self.myimage self.mainview.addsubview(view) 

you should have showed cocoa code , had tried.

in case, cocoa views clip bounds default. if don't want image scaled, set imagescaling property nsimagescalenone.


Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -