English 中文(简体)
更改《联邦法典》 观点作品
原标题:Resizing a UIView so UIScrollView works

我以小体形式建造,主要在接口建设中:

“enterography

当用户在案文领域之一内触动时,我把屏幕上排在首位(指出,在键盘不存在时,不需要任何滚动,也不需要把任何领域隐藏在钥匙板上)。

“entergraph

我用很少的法典来做到这一点。 我的表格控制都在《电离辐射观察》中,该电离辐射剂量为0x0(违约)。 当我发现主机存在时,我能够将其转至views s widthview 高度+键盘大小。 然后,当关键板被拆除时,我可以调取和转播(我把它 back回0x0)。

这几乎是完美的。 除一个例外(迄今为止):

滚动区(或者说,它内部的观点)过于仓促。 由于没有钥匙板的表格没有打上整个屏幕,我发现,我可以把我的看法(一个完整的屏幕)和关键板高度推向下,而我真的想要的是把这个观点推向“contents+键盘高度。

我认为,我可以简单地缩短观点,只是内容的适当规模,而接口建设商(xcode 4.2)似乎迫使它接受整个屏幕。 试图在法典中这样做也是不可行的,因为表面上是自我的。 我怎么能实现我所期待的东西? 具体来说,当关键板上下台时,我想屏幕上上半部的滚动区会缩小,这样,底部就会有这么多的黑色:

“entergraph

最佳回答

First, self.view.frame is a struct with two fields that are structs itself - size and origin. If you want to change either size or origin, you have change the whole frame

self.view.frame = CGRectMake(self.view.frame.origin.x,self.view.frame.origin.y, 
    self.view.frame.size.width, <your desired height>);

第二,创造你的形式有什么基础? 这似乎只是一个UITableVIew。 如果是的话,考虑将贵方意见书记员改换为易读书记员,因为它自动处理键盘。

If neither is an option for you, provide the code you use when handling keyboard appearance, so that we could think of more concrete answer.

问题回答

暂无回答




相关问题
How to change out-of-focus text selection color in Xcode?

Okay, I ll bite. I ve got really pleasant code/window colors set up in Xcode. Ordinarily, my selection color is very visible. When I am doing a project search and iterating through the results, ...

Iphone NSTimer Issue

Hi I am new to objective c. I am trying to make an app for iphone. I have a button on my view, and the click on which the function playSound is called. This is working properly. It does plays the ...

Include a .txt file in a .h in C++?

I have a number of places where I need to re-use some template code. Many classes need these items In a .h could I do something like: #include <xxx.txt> and place all of this code in the ....

Iterating over string/strlen with umlauted characters

This is a follow-up to my previous question . I succeeded in implementing the algorithm for checking umlauted characters. The next problem comes from iterating over all characters in a string. I do ...

Xcode open two editor windows with same file

Is it possible to open the same file in two separate windows in Xcode. I can open a file in one window and the same file in the main Xcode editor window, but I wanted two separate fulltime editor ...

Forcing code signing refresh in Xcode

In our environment, we share resources across multiple projects and platforms. When building for iPhone, only a subset of those resources are needed. Since that subset is still considerable, we have ...

热门标签