I want to create an iOS app that contains a uiimageview and a button so that when a user hits a button the image view is generated by a set of 2 nested while loops that set the pixels for the uiimageview. i can do this in C with a bitmap quite easily but I’m not sure how to approach this for iOS could I save a bitmap to NSUserDefaults and load it from there?
Not sure, thanks for the help.
I want to create an iOS app that contains a uiimageview and a button
Share
UIImageViewworks withUIImage, which is aUIKit‘s wrapper forCGImage. In any case you should have either aCGImageorUIImage. What can you do? Draw an image dynamically using CoreGraphics and/or UIKit’s drawing methods (take a look at Quartz2D Programming Guide). Or if you can have a raw byte data of your image you can directly create anUIImageinstance:then just set your
UIImageView‘simageproperty: