uiimageview

Pictures are very small when added to UIimageview in Interface Builder

♀尐吖头ヾ 提交于 2019-12-13 06:09:22
问题 I have 6 images, all the same size (65x65). When I create an imageview and add this image through the "image view attributes" in the interface builder, the picture is very small. Maybe 5x5. The pictures also show up small when viewing them in the resource folder however, when running the program, they are the right size. Is there some setting I need to change to get the images to show the full size/full resolution within the interface builder? Thanks. 回答1: Make sure your UIImageView is active

How to display multiple UIImageViews

烈酒焚心 提交于 2019-12-13 05:47:05
问题 I have 5 images I would like to display on the view randomly. My image names are as follows: image-0, image-1, image-2, image-3, image-4. What I need is I want to display each image, but the problem is when I write the code to display a second, it stacks on top of the first image. Here is my code to display one of my images: - (void)viewDidLoad { int xValue = arc4random() % 320; int yValue = arc4random() % 480; image.center = CGPointMake(xValue, yValue); {UIImageView *imgFive = [[UIImageView

Hiding Imageview

*爱你&永不变心* 提交于 2019-12-13 05:29:55
问题 I am adding uiimageview as a subview to tabbarcontroller.view. when i pushed to other viewcontroller tabbar gets hided but the image added to the tabbarcontroller is appearing. Please help me to remove the imageviewwhile pushing to other viewcontroller. imgV=[[UIImageView alloc]initWithFrame:CGRectMake(0, 428, 320, 48)]; tabBarController = [[UITabBarController alloc] init]; tabBarController.moreNavigationController.navigationBar.barStyle = UIBarStyleBlackOpaque; tabBarController

How to put UIImageView on the background of the layout

ε祈祈猫儿з 提交于 2019-12-13 05:24:41
问题 Greetz, So this is rather a simple question (maybe not a simple answer). I want the IB option called 'send to back' (On IB, go to Layout -> Send to back) to be done programmatically. Is it possible? If not, any suggestions to simulate the same thing? This is for an UIImageView as the title states. 回答1: Use sendSubviewToBack: [yourSubView.superview sendSubviewToBack:yourSubView]; 回答2: [self insertSubview:view atIndex:index]; Just experiment with the index you need. 来源: https://stackoverflow

Custom cell imageView shifts to left side when editing tableView

那年仲夏 提交于 2019-12-13 05:22:52
问题 I have a tableView that I need to be able to delete items from, however, when I put it back from editing mode, the imageView from my custom cell gets shifted over to the left side. Here's some relevant code and images: func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { var cell = tableView.dequeueReusableCellWithIdentifier("cell", forIndexPath: indexPath) as! NotificationsTableViewCell cell.storiesLabel.text = stories[indexPath.row].name

UIImageView height on iPhone 6 and iPhone 6 Plus Zoomed display mode

好久不见. 提交于 2019-12-13 05:14:22
问题 I have a UIImageView *backgroundImageView in my ViewController and call in my viewDidLoad [self.backgroundImageView sizeToFit] I found that on the iPhone 6 the height changes from 667 (Normal display) to 558 (Zoomed display) However on the iPhone 6 Plus the height remains the same at 736 for both. Is this expected? 回答1: Try it. Here Given code based on your current screen height. float img = frame.size.height / frame.size.width; frame.size.width = [[UIScreen mainScreen] bounds].size.width;

Draw and Erase on ImageView using UIBezierPath

烂漫一生 提交于 2019-12-13 04:46:30
问题 I write this link's answer code to create ImageViewLayer and Imageview. StackOverflow Link This link gives me the below result. It's work fine .But I want ,when user press the original button... and then touches with finger it remove the clear area ang fill with the previous one. And how to create Undo Functionality for this..If any question regarding this please add your comment..Please help me... 回答1: how to draw CALayer with line path like simulate eraser effect? this is the post i get the

iOS drag and drop to another view with subclass

一个人想着一个人 提交于 2019-12-13 04:36:13
问题 I have a RootViewController with a UIScrollView (boardScrollView). This has a UIImageView as subview to create a board (boardImage). I can zoom in and out, works fine. Also scrolling works fine! Now, I want to drag & drop other UIImageViews (Tiles) into and out of the ScrollView. I have subclassed UIImageView to TileImageView and overridden methods touchesBegan, touchesMoved and touchesEnded. The drag & drop works fine on the superview. But I want to be able to drop the Tiles on the

Retrieve Image for different Class Data browser Parse.com

大兔子大兔子 提交于 2019-12-13 04:31:47
问题 Hello everyone I'm trying to display the profile picture of a user registered with the app. In this query I am getting data from a different class from wherever it is in the photo databrowser. I tried with MatchesQuery but I can not find the right combination ... Probably my code is wrong ... - (void)QueryForTableView { PFQuery *QueryForFriend=[PFQuery queryWithClassName:@"Amicizie"]; [QueryForFriend whereKey:@"A_User" equalTo:[PFUser currentUser]]; [QueryForFriend includeKey:@"Da_User"];

Why will UIImageView not change to a different image having been set once?

我是研究僧i 提交于 2019-12-13 04:06:43
问题 My code UIImage *img = [UIImage imageWithCGImage:[repr fullResolutionImage]]; [_photoPreview setImage:img]; works fine for the first time. When I want to update the image in _photoPreview however, it will not do so and stays with the original. I have a vague suspicion that this is to do with when the interface is loaded or something but I could be completely wrong. Any help would be greatly appreciated. 回答1: I have no problems changing the image in the image view by implementing the following