Tag: 调整

在iOS中调整WebGL上下文的大小

iOS WebGL有一个错误,可以用下面的HTML重现: <html> <head> <title>Resize WebGL</title> <meta name="viewport" content="width=device-width, user-scalable=no"> </head> <body> <input type="button" id="resizeButton" value="resize"><br> <canvas id="chart" style="width:100px; height:100px; border:1px solid #000;"> <script> var canvas = document.getElementById('chart'); var gl = null; function resetGL() { var devicePixelRatio = 2; // Warning: overrides window.devicePixelRatio var w = Math.floor(canvas.clientWidth * devicePixelRatio); var h = Math.floor(canvas.clientHeight * devicePixelRatio); […]

iOS – 调整UIImage的色调

可以调整UIImage / CGContextRef的Hue吗? 我试图将上下文与Color和Hue混合模式混合,但结果是错误的。 我应该将RGB转换成HSB,调整HSB并转换回来?

iOS版。 如何更改UINavigationBar高度并一次更改其他子视图的框架?

我使用基于导航的应用程序,例如有一些viewControllers与UITableView 。 如果我更改UINavigationBar高度,那么我必须手动更改每个viewController的其他元素的框架。 这个问题有什么共同的解决办法吗?

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.. […]

在UICollectionView中删除一个单元格后,单元格布局刷新

我创build了一个dynamic调整单元格高度的UICollectionView。 我正在调整这个单元格的大小: func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { let approximatedwidthoftextview = view.frame.width – 70 let size = CGSize(width: approximatedwidthoftextview, height: 1000) let attributes = [NSAttributedStringKey.font: UIFont(name: "Avenir Next", size: 18)] let estimatedFrame = NSString(string: allnotes[indexPath.row].note).boundingRect(with: size, options: .usesLineFragmentOrigin, attributes: attributes, context: nil) return CGSize(width: view.frame.width, height: estimatedFrame.height + […]

有没有一个path,每个应用程序可以在越狱iPhone写入文件?

我应该挂钩每个应用程序的UIResponder ,包括SpringBoard和其他任何应用程序。 在挂钩,我会写一些东西到指定的文件。 如果我设置了Cydia推荐的/var/mobile/Library/MyApp的path,我发现只有SpringBoard和MyApp可以成功写入。 那么有没有一个地方每个应用程序可以写和读?

如何使用Autolayout调整UIView的通用应用程序

我做了UIView与UIViewembedded里面。 我用约束来得到一个体面的UIView,但它仍然没有工作,我想要的方式,即使结果是好的。 我想得到同样的结果,我已经在iPhone 4.7英寸的iPhone 5.5英寸和4英寸。 为此,我想我需要调整blue UIViews但我不知道如何使他们自动resize从storyboard或programmaticaly。 我记得很久以前,我做了一个Android应用程序,这很容易,我只需要给出一个% bigger or lower的% bigger or lower 。 有没有办法与iOS做到这一点?

如何在系统级捕获和loggingiOS触摸事件?

我想在系统级捕获所有的触摸事件,我并不是指在一个指定的应用程序捕获,但所有的应用程序,甚至是SpringBoard。我试过IOHIDEvent( https://github.com/kennytm/iphone-private-frameworks / tree / master / IOKit / hid ),但是运行时头文件在iOS4之后被改变了,现在我无法得到它们的iOS6。 也许是GSEvent也是一个好方法,但是有谁知道GSEvent如何做到这一点? 谢谢!

移动衬底调整的根权限

我正在开发一个调整,当互联网可达时,它做了一些事情。 这是用苹果的可达性API完成的。 调整在SpringBoard中加载。 我有一个.plist文件包含/MyTweaksFolder中的一些信息。 我可以阅读,但我不能修改或改变它。 我猜这与SpringBoard的特权有关。 我的问题是:如何在SpringBoard中授予root访问权限?

如何隐藏标签栏并在屏幕上显示完整的桌面视图?

在我的应用程序的实现中,我有一个带有5个不同选项卡的TabBar控制器。 通过下面的代码隐藏我的标签栏后 – (void)hideTabBar { for(UIView *view in self.tabController.view.subviews) { if([view isKindOfClass:[UITabBar class]] || [view isKindOfClass:[UIButton class]]) { view.hidden = YES; } } } 我仍然看到我的tableview的底部被一个白色的矩形部分遮盖(以前由可见的tabbar占用) 例如,在我隐藏标签栏之前 当我隐藏标签栏后,tableview仍然没有完全显示在屏幕上,底部仍然被一个白色的矩形空间占用(以前由标签栏占用 如上所述,我怎样才能隐藏tabbar,并确保整个tableview显示在我的屏幕上?