objective c - Loading UIImage in UIAlertView -


I am trying to load UIImage which is the Images.xcassets < / Code> Labels Secret walls . The image is a .jpg file and is 500x500 I believe the problem is with the CGRectMake frame, and that I'm starting it incorrectly, but I There is no way to fix it. Currently UIImageView will just load the @ "Image" title and the @ "OK" button.

  UIAlertView * alert = [[UIAlertView alloc] initWithTitle: @ "Image" Message: Zero Representation: Cancel Null Strategy: @ "Finished" Other Button Titles: Nil]; UIImageView * imageView = [[UIImageView alloc] initWithFrame: CGRectMake (110, 80, 66, 66)]; NSString * path = [[NSString alloc] initWithString: [[[NSBundle main bundle] resourcepath] stringbapping path comparison: @ "Secret Walls"]]; UIImage * bkgImg = [[UIImage alloc] initWithContentsOfFile: path]; [ImageView set image: bkgImg]; [Warning addSubview: imageView]; [Alerts show];   

Is CGRectMake initialization incorrect? Or is it something else that I am doing wrong?

  There is a slight change in IOS UIImageView * imageView = [[UIImageView alloc] initWithFrame: CGRectMake 110, 80, 66, 66)]; UIImage * wonImage = [UIImage imageNamed: @ "thumbs_up_icon"]; [ImageView setImage: win image]; // Check that the OS version is 7 or above UIAlertView * Warning = [[UIAlertView alloc] initWithTitle: @ "Image" Message: Zero Representation: Cancel Null Strategy: @ "Ended" Other Button Titles: Nil]; If (Flooring (NSFW), NSFoundationVersionNumber_iOS_6_1) {[alert set value: imageView forKey: @ "Helpful view"]; } And {{alert addSubview: imageView]; } [Alerts show];    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -