setStatusBarHidden(_:withAnimation :)在iOS 9中不推荐使用

我发现在iOS 9中, setStatusBarHidden(_:withAnimation:)现在已被弃用,文档中提到使用[UIViewController prefersStatusBarHidden]但如果我仍然想用幻灯片animation隐藏状态栏,iOS 9中的替代方法是什么?

iOS UITabBar:删除顶部阴影渐变线

我实现了一个自定义UITabBar,我仍然有这个梯度/阴影的顶部。 我补充说 [self.tabBar setBackgroundImage:[UIImage imageNamed:@"navBarBottom.png"]]; 这只是改变背景,但保持阴影渐变。 我究竟做错了什么 ? 有什么要指定摆脱它? 我拥有的 : 我想要的是 : 谢谢。

垂直拼接/复合多个图像并保存为一个图像(iOS,objective-c)

我需要帮助写一个objective-c函数,将采取一系列UIImages / PNGs,并返回/保存所有图像垂直顺序拼接在一起的高图像。 我是新来的,所以请慢下来,放轻松:) 我的想法到目前为止:绘制一个UIView,然后addSubviews每个人的父母(的图像),然后?

H.264 over RTP / RTSP(iPhone)

在iPhone中原生可以通过RTP / RTSP查看videostream(H.264 Live Feed)吗? 如果没有,是否可以为此写一个应用程序?

使用GPUImage重新创buildiOS 7 Glass效果

我试图通过将图像效果应用于MKMapView的屏幕截图来使用我的玻璃杯中的iOS 7样式玻璃效果。 Apple提供的这个UIImage类别是我用作基线的。 该方法使源图像去饱和,应用色调颜色,并使用input值重度模糊: [image applyBlurWithRadius:10.0 tintColor:[UIColor colorWithRed:229/255.0f green:246/255.0f blue:255/255.0f alpha:0.33] saturationDeltaFactor:0.66 maskImage:nil]; 这产生了我正在寻找的效果,但是时间太长了.5秒之间在iPhone 4上渲染。 我想使用优秀的GPUImage因为我的初步尝试已经快了5-10倍,但我似乎无法做到。 GPUImagePicture *stillImageSource = [[GPUImagePicture alloc] initWithImage:image]; GPUImageSaturationFilter *saturationFilter = [[GPUImageSaturationFilter alloc] init]; saturationFilter.saturation = 0.33; // 1.0 – 0.66; [stillImageSource addTarget:saturationFilter]; GPUImageMonochromeFilter *monochromeFilter = [[GPUImageMonochromeFilter alloc] init]; [monochromeFilter setColor:(GPUVector4){229/255.0f, 246/255.0f, 1.0f, 0.33f}]; [monochromeFilter setIntensity:0.2]; [saturationFilter addTarget:monochromeFilter]; GPUImageFastBlurFilter *blurFilter = […]

如何确定一个WKWebView的内容大小?

我正在尝试在iOS 8和更新版本下运行时用WKWebView实例replacedynamic分配的UIWebView实例,而我找不到确定WKWebView内容大小的方法。 我的Web视图embedded在一个更大的UIScrollView容器中,因此我需要确定Web视图的理想大小。 这将允许我修改其框架以显示其所有的HTML内容,而无需在Web视图中滚动,我将能够为滚动视图容器(通过设置scrollview.contentSize)设置正确的高度。 我试过sizeToFit和sizeThatFits没有成功。 这是我的代码,创build一个WKWebView实例,并将其添加到容器滚动视图: // self.view is a UIScrollView sized to something like 320.0 x 400.0. CGRect wvFrame = CGRectMake(0, 0, self.view.frame.size.width, 100.0); self.mWebView = [[[WKWebView alloc] initWithFrame:wvFrame] autorelease]; self.mWebView.navigationDelegate = self; self.mWebView.scrollView.bounces = NO; self.mWebView.scrollView.scrollEnabled = NO; NSString *s = … // Load s from a Core Data field. [self.mWebView loadHTMLString:s baseURL:nil]; […]

带有渐变的UIButton,圆angular,边框和阴影

在网站上有一些类似的问题,但我正在寻找一些具体的,稍有不同的东西。 我遵循这里给出的方向: http : //www.cimgf.com/2010/01/28/fun-with-uibuttons-and-core-animation-layers/以子类UIButton为了创build一个generics类,我可以指定渐变颜色,而不是尝试使用静态图像。 我碰到一个问题,button层上的setMasksToBounds将允许A)显示阴影,但也允许渐变图层显示超出圆angular或B)渐变图层剪辑到圆angular,但不允许显示阴影 我对这个问题的解决方法看起来很笨重(尽pipe有效),我想看看是否有人知道一个更好和/或更简洁的方法来完成同样的事情。 这是我的代码: CSGradientButton.h #import <UIKit/UIKit.h> @interface CSGradientButton : UIButton { UIColor *_highColor; UIColor *_lowColor; CAGradientLayer *gradientLayer; CALayer *wrapperLayer; CGColorRef _borderColor; } @property (nonatomic, retain) UIColor *_highColor; @property (nonatomic, retain) UIColor *_lowColor; @property (nonatomic) CGColorRef _borderColor; @property (nonatomic, retain) CALayer *wrapperLayer; @property (nonatomic, retain) CAGradientLayer *gradientLayer; – (void)setHighColor:(UIColor*)color; – (void)setLowColor:(UIColor*)color; […]

使用PhoneGap不工作的ios中的Ajax https调用?

我无法做到使用从iPad / iPhone的AJAX的POST POST调用。 其实我想在我的PhoneGap应用程序中调用这个。 在这方面你能帮我吗?

UIImagePickerController编辑视图圆形覆盖

我已经能够完成我一直想要完成的工作了,那就是复制iOS内置的圆形照片裁剪器,用于内置的联系人应用程序。 然而,我坚持试图让我的CAShapeLayers正确的做出。 我试图做一个透明的320像素直径的圆圈,其余的视图充满了0.9 alpha黑色背景。 圆形和矩形是在正确的位置,但是,圆形是不完全透明的,就像我需要的那样。 我失去了如何解决这个问题。 我感谢您的帮助! 代码和屏幕截图: – (void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated { if ([navigationController.viewControllers count] == 3) { CGRect screenRect = [[UIScreen mainScreen] bounds]; CGFloat screenHeight = screenRect.size.height; UIView *plCropOverlay = [[[viewController.view.subviews objectAtIndex:1]subviews] objectAtIndex:0]; plCropOverlay.hidden = YES; CAShapeLayer *circleLayer = [CAShapeLayer layer]; if (screenHeight == 568) { [circleLayer setPosition:CGPointMake(0.0f,124.0f)]; } else { […]

阅读iPhone的Ambient Light传感器

我注意到在我的iPhone上,在阳光直射的几秒钟之后,屏幕会调整为变亮,变暗等。我想知道是否有办法与这个传感器进行交互? 我有一个在外面使用的应用程序。 当你进入直射光线时,在调整之前很难看到几个屏幕。 即使如此,它并不总是像我希望的那样明亮。 我想实现一个高对比度的户外观看皮肤,和一个低对比度的室内观看。 这是否可以读取光传感器数据,如果是这样,我该如何提取这些传感器值? 然而,我认为有一个光线传感器,因为相机知道何时使用闪光灯。