Tag: uiimageview

如何使用popvivew控制器使用Uiimage从一个视图控制器到其他视图控制器?

我有两个视图控制器。 第一个UIViewController包含一个UIImage,当我点击“裁剪”button,转到第二个视图控制器,我通过推视图控制器传递图像,在这里我剪裁我的UIImage。 在第二个UIViewController裁剪我的图像后,点击“完成”button,我需要将裁剪的图像传递到第一个视图。 问题是当我使用popup式视图控制器,图像不通过。

添加到UIImageView时,UIButton没有响应

我试图添加一个button到一个透明背景的UIImageView – button显示确定,但没有响应。 (takePictureClicked不叫) 我的代码: cameraController = [[UIImagePickerController alloc] init]; cameraController.sourceType = UIImagePickerControllerSourceTypeCamera; cameraController.delegate = self; cameraController.allowsEditing=YES; cameraController.showsCameraControls = NO; cameraController.navigationBarHidden = YES; cameraController.toolbarHidden = YES; // overlay on top of camera lens view UIImageView *cameraOverlayView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"camera_overlay.png"]]; cameraOverlayView.alpha = 0.0f; //Take picture button UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; UIImage *btnImage = […]

UIImageView不会调整边界或框架更改?

所以我有一个自定义视图(它是一个自定义的textview,位于键盘上); 但它可以resize,所以我想要背景图像(UIImageView与UIImage内)来扩展它。 下面的代码什么都不做: //size of entire custom view CGRect bFrame = self.keyboard.frame; bFrame.origin.y += heightDifference; bFrame.size.height += heightDifference; //lets set frame and bounds for the uiimageview self.keyboard.background.frame = bFrame; self.keyboard.background.bounds = bFrame; //I thought the lines above would work, but they didn't, trying to reset the image and change its content mode as a hack.. […]

在ios中的imageView中的path显示图像

我有图像path,我想在uiimageview中显示它, /用户/ WTS-新build/库/开发商/ CoreSimulator /设备/ F43C 26D2-DCFF-4764-AAF0-F6CC7BCDCF5D /数据/有限公司ntainers /数据/方面的应用中/ 8E49D340-7CAC-4031-85BF -9E5C26A1E3 7A /文档/小米ario.png 我怎样才能让图像显示?

XCode自定义活动指标 – 在UIWebView加载后隐藏(webViewDidFinishLoad)

我使用http://blog.blackwhale.at/?p=336中的代码在当前版本的xCode中创build一个自定义activityIndicator 。 此代码在数组中使用一系列.png图像,然后以设置的时间间隔显示它们,以创build一个animation加载图像,然后您可以随时放置在屏幕上(并假设您可以以某种方式将其删除)。 在我的主ViewController.m文件中我有我的viewDidLoad部分中的以下代码: /* — START CUSTOM ACTIVITY INDICATOR */ //Create the first status image and the indicator view UIImage *statusImage = [UIImage imageNamed:@"activity1.png"]; UIImageView *activityImageView = [[UIImageView alloc] initWithImage:statusImage]; //Add more images which will be used for the animation activityImageView.animationImages = [NSArray arrayWithObjects: [UIImage imageNamed:@"activity1.png"], [UIImage imageNamed:@"activity2.png"], [UIImage imageNamed:@"activity3.png"], [UIImage imageNamed:@"activity4.png"], [UIImage imageNamed:@"activity5.png"], […]

如何将图像上传到mysql数据库的iOS应用程序

我是iOS开发新手,目前正在为uni中的主要项目创build一个应用程序。 我正在创build一个注册页面,要求用户填写他们的详细信息,并上传图片。 到目前为止,我已经有了值到数据库,但我不知道如何也添加图像select器已经选定的图像。 任何人都可以帮忙吗? 该代码张贴在下面…. RegistrationViewController.h #import <UIKit/UIKit.h> #define kpostURL @"http://myurl.com/myphp.php" #define kfname @"fname" #define ksname @"sname" #define kemail @"email" #define kusername @"username" #define kpassword @"password" #define kinstrument @"instrument" #define klocation @"location" @interface registrationViewController : UIViewController <UIImagePickerControllerDelegate, UINavigationControllerDelegate> { UIScrollView *scrollView_; BOOL keyboardVisible_; IBOutlet UITextField *fnameText; IBOutlet UITextField *snameText; IBOutlet UITextField *emailText; IBOutlet UITextField *usernameText; […]

如何只保存UIImageView不是我的照片应用程序的整个屏幕。 在Swift中

我的应用程序有一个相机部分。 它拍摄一张照片,然后在照片上加水印。 但是,当保存照片时,整个屏幕将被保存,而不仅仅是UIImageView 。 我只想要保存UIImageView 。 不是那样,而是因为button上的菜单栏不是那么大。 我只是觉得没有图片中的菜单栏会更好。 拍照之前的应用照片: 如何拍摄照片的照片保存: 这是我的代码如下。 import UIKit class Camera: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate, UITextFieldDelegate { @IBOutlet weak var cameraScreen: UIImageView! var screenView: UIImageView! @IBAction func Camera(_ sender: AnyObject) { if UIImagePickerController.isSourceTypeAvailable(UIImagePickerControllerSourceType.camera){ let imagePicker = UIImagePickerController() imagePicker.delegate = self imagePicker.sourceType = UIImagePickerControllerSourceType.camera; imagePicker.allowsEditing = false self.present(imagePicker, animated: true, completion: nil)}} func […]

想要在圈子中显示图像是可能的以及如何

嗨,我想显示的图像不在矩形中的所有这些将显示在tableview

选框animationUIimageView模糊

在我的应用程序图像是在选框效果(HTML)。 所以我通过使用NSTimer设置图像的X点,但它成功实现,但图像显示一些模糊。 我如何去除这个模糊效果? int x=0; ImgArray=[[NSMutableArray alloc] initWithObjects:[UIImage imageNamed:@"keyframe1.png"],[UIImage imageNamed:@"keyframe2.png"],[UIImage imageNamed:@"keyframe3.png"],[UIImage imageNamed:@"keyframe4.png"], [UIImage imageNamed:@"keyframe5.png"],nil]; imgView=[[UIImageView alloc]initWithFrame:CGRectMake(x, 0, 1024, 768)];` imgView.image=[ImgArray objectAtIndex:0]; [self.view addSubview:imgView]; [NSTimer scheduledTimerWithTimeInterval:.08 target:self selector:@selector(showMarquee) userInfo:nil repeats:YES]; 在showMarquee方法中更改x的值

使图像可以从其他ViewController访问

我只想知道制作一个名为profpic的图像的代码,可以访问我制作或打算制作的所有其他ViewController。 我已经阅读了许多关于全局variables,公共variables和其他build议的文章。 如果有帮助,我特别使用这个来显示ViewControllerA的图像作为ViewControllerB的背景。