iOS - 使用StoryBoard创建Popover视图(iOS - Create an Popover View using StoryBoard)
大家好,现在我正在尝试使用Xcode故事板创建一个Pop-OverView。 首先,我有
rootViewController, UIViewController, and UITableViewController
我希望UIView充当页面翻转,UITableView将在navigationBar项目控制器下显示popOver。
对于UITableView,我想在NavigationBar控制器下制作Pop-Over。 问题是,当我触摸导航项目以显示UITableViewController时,它显示正确,但是当我尝试关闭Pop-Over View时,它不会关闭。 然后,导航项不能很好地工作。 当我多次触摸它时,它会显示popOverView的多个实例。
这对我来说似乎没有意义。 任何人都可以帮我或告诉我在哪里可以找到关于此的文档/教程?
更新:
对于UIPopOverController,它现在似乎运行良好,但是当我多次触摸导航项时,它仍然在困扰我。 它将显示PopOver的多个实例。 我该如何处理它,它只显示一个实例?
Hi there, Now I'm trying to create a Pop-OverView using an Xcode storyboard. Firstly, I have
rootViewController, UIViewController, and UITableViewController
I want the UIView to act as a page flip and the UITableView will show popOver under the navigationBar item controller.
For the UITableView, I want to make a Pop-Over under NavigationBar controller. The problem is, when I touch the Navigation item to show the UITableViewController, it shows correctly, but when I try to close the Pop-Over View, it won't close. And then, the navigation item doesn't work well. It shows multiple instances of popOverView when I touch it multiple times.
This doesn't seem to make sense to me. Can anyone help me out or tell me where to find documentation / tutorials on this?
UPDATE:
For the UIPopOverController, it seems to work well now, but it is still bugging me when I touch a Navigation Item multiple times. It will show multiple instances of PopOver. How can I handle it, so it will show only one instance?
原文:https://stackoverflow.com/questions/8225589
最满意答案
您没有在
IdFTP.Get
调用后重置内存流。 这意味着LoadFromStream
调用接收0字节,因此#42错误:var ms1 : TMemoryStream; J : TJPEGImage; St : String; begin try ms1 := TMemoryStream.Create; try St := 'somepath'; IdFTP1.Get(St, ms1); if ms1.Size > 0 then begin ms1.Position := 0; // <-- add this J := TJPEGImage.Create; try J.LoadFromStream(ms1); Image4.Picture.Graphic := J; finally J.Free; end; end; finally ms1.Free; end; except on E: Exception do ShowMessage(E.Message); end; end;
You are not resetting the memory stream after the
IdFTP.Get
call. This means that theLoadFromStream
call receives 0 bytes and hence the #42 error:var ms1 : TMemoryStream; J : TJPEGImage; St : String; begin try ms1 := TMemoryStream.Create; try St := 'somepath'; IdFTP1.Get(St, ms1); if ms1.Size > 0 then begin ms1.Position := 0; // <-- add this J := TJPEGImage.Create; try J.LoadFromStream(ms1); Image4.Picture.Graphic := J; finally J.Free; end; end; finally ms1.Free; end; except on E: Exception do ShowMessage(E.Message); end; end;
相关问答
更多-
mysql修改密码错误 ERROR 1054 (42S22)[2024-04-26]
这样试试,我也是这样改的mysql>update mysql.user set authentication_string=password('123qwe') where user='root' and Host ='localhost'; -
解 我试图在Adobe Fireworks中打开我的文件( img_myImage.png ),该文件不会打开该文件,因此我在Photoshop中打开了该文件,然后将其重新保存为.png文件,这似乎解决了问题。 SOLUTION I tried opening my file (img_myImage.png) in Adobe Fireworks, which wouldn't open the file, so I opened it in Photoshop which did work, and t ...
-
与库Mike 42的PHP错误(Php error with library Mike 42)[2024-01-31]
造成问题的原因是,当您实例化WindowsPrintConnector ,您需要传入共享打印机的名称: $connector = new WindowsPrintConnector("EPSON TM-T20 Receipt"); 显然,它不能用这个名字。 在https://github.com/mike42/escpos-php/blob/development/example/interface/windows-usb.php#L13-L18上尝试进行故障排除。 The cause of your p ... -
从评论中,您似乎正在运行以下内容: dmd -c point.d dmd main.d # presumably contains `import point;` 第一个命令将point.d编译(但不链接)到point.o 。 第二个命令编译并将main.d 和main.d链接到可执行文件中。 它失败并出现“缺少符号”错误,因为DMD不会查找或生成不在其命令行上的任何内容的代码。 当你import points; ,您只导入符号,而不是实际代码。 要解决这个问题,要么...... 与main.d一起编译m ...
-
SQL语法错误42X01(SQL Syntax Error 42X01)[2022-10-27]
它应该如下所示: CREATE TABLE Team ( Team_id INT, Team_name VARCHAR (20), Region VARCHAR (10), League VARCHAR (30), Manager VARCHAR (20), CONSTRAINT PK_Team PRIMARY KEY (Team_id) ); It should look like this: CREATE TABLE Team ( Team_id INT, Team_name VARCHA ... -
分配JPEG错误#42(JPEG Error #42 on assign)[2021-12-25]
您没有在IdFTP.Get调用后重置内存流。 这意味着LoadFromStream调用接收0字节,因此#42错误: var ms1 : TMemoryStream; J : TJPEGImage; St : String; begin try ms1 := TMemoryStream.Create; try St := 'somepath'; IdFTP1.Get(St, ms1); if ms1.Size > 0 then b ... -
解决了这个问题。 我使用drop命令删除了cache_field表,然后使用下面的命令再次创建表。 CREATE TABLE IF NOT EXISTS `cache_field` ( `cid` varchar(255) NOT NULL DEFAULT '' COMMENT 'Primary Key: Unique cache ID.', `data` longblob COMMENT 'A collection of data to cache.', `expire` int(11) NOT NULL ...
-
我认为您对文件filgoal.png有问题... C:\ projects \ ZwallU \ app \ build \ res \ all \ debug \ drawable-hdpi \ filgoal.png错误代码:42输出:libpng错误:不是PNG文件 使用编辑器打开它,并保存为选择了PNG。 也许,该文件采用另一种格式,如JPEG。 I think that you have a problem with the file filgoal.png... C:\projects\Zwal ...
-
尝试把 img.setImageResource(images[cur]); 而不是 ImageViewPic.setImageResource(images[cur]); Try putting img.setImageResource(images[cur]); instead of ImageViewPic.setImageResource(images[cur]);
-
无法分配“42”:“Event.user_id”必须是“用户”实例(Cannot assign “42”: “Event.user_id” must be a “User” instance)[2022-10-10]
问题出在这段代码中: def create_new_event(request, steps): if request.method == 'POST': if(steps=="step_1"): stepFirstForm = CreateEventStepFirstForm(request.POST) if stepFirstForm.is_valid(): eventStepFirst = ...