小编Exc*_*ion的帖子

如何在键盘出现时使视图控制器滚动到文本字段

我想制作我的uiviewcontroller.xib卷轴.我的视图控制器有8个文本字段.所以我的问题是当我想在第5页写东西时textfield,我的键盘上的文字区域也是如此.如何摆脱这个问题,让我的viewcontroller滚动?

请详细说明,因为我是iPhone开发的新手.

提前致谢.

xcode objective-c uiscrollview uiviewcontroller ios

9
推荐指数
2
解决办法
2万
查看次数

如何在imageview ios中获取自定义图像的像素颜色值?

我之前已经问过类似的问题.

我想要的是获取Image Inside的RGB像素值Imageview,因此它可以是我们想要得到的像素值的任何图像.

这就是我用来获取点击图像的点.

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {

    UITouch *touch = [touches anyObject];

    if ([touch tapCount] == 2) {
        //self.imageView.image = nil;
        return;
    }

    CGPoint lastPoint = [touch locationInView:self.imageViewGallery];
    NSLog(@"%f",lastPoint.x);
    NSLog(@"%f",lastPoint.y);

} 
Run Code Online (Sandbox Code Playgroud)

为了获得图像,我已粘贴此代码.

+ (NSArray*)getRGBAsFromImage:(UIImage *)image atX:(int)xx andY:(int)yy count:(int)count
{

 NSMutableArray *result = [NSMutableArray arrayWithCapacity:count];

      /** It requires to get the image into your data buffer, so how can we get the `ImageViewImage` **/

CGImageRef imageRef = [image CGImage];
NSUInteger width = CGImageGetWidth(imageRef);
NSUInteger height = …
Run Code Online (Sandbox Code Playgroud)

color-picker image-processing objective-c uiimageview ios

4
推荐指数
1
解决办法
7677
查看次数

如何从NSArray中删除括号?

我有一个数组包含每个索引的数组.

array is :(
        (
        "http://localhost/ColorPicker/upload/2014-01-14-04-01-19g1.jpg",
        "http://localhost/ColorPicker/upload/2014-01-14-04-01-20g2.jpg",
        "http://localhost/ColorPicker/upload/2014-01-14-04-01-20g3.jpg"
    ),
        (
        "http://localhost/ColorPicker/upload/2014-01-14-04-01-49y1.jpg",
        "http://localhost/ColorPicker/upload/2014-01-14-04-01-50y2.jpg"
    ),
        (
        "http://localhost/ColorPicker/upload/2014-01-14-04-01-50y3.jpg",
        "http://localhost/ColorPicker/upload/2014-01-14-04-01-51y6.jpg"

    )
)
Run Code Online (Sandbox Code Playgroud)

我想制作一个类似的数组

  (  
"http://localhost/ColorPicker/upload/2014-01-14-04-01-50y3.jpg",
"http://localhost/ColorPicker/upload/2014-01-14-04-01-51y6.jpg", 
"http://localhost/ColorPicker/upload/2014-01-14-04-01-50y3.jpg",
"http://localhost/ColorPicker/upload/2014-01-14-04-01-51y6.jpg",                    
"http://localhost/ColorPicker/upload/2014-01-14-04-01-50y3.jpg",
"http://localhost/ColorPicker/upload/2014-01-14-04-01-51y6.jpg"
    )
Run Code Online (Sandbox Code Playgroud)

如何在数组中消除(),()并创建包含url的单个数组.

arrays objective-c nsarray ios

1
推荐指数
2
解决办法
1295
查看次数