如何隐藏iPhone上第一个视图中的后退按钮?(How to hide back button in the first view on iPhone?)
我为应用程序添加3个视图,他们需要从1-2-3切换。
现在我在SwitchViewController的底部添加一个工具栏和一个按钮'OK',以便他们可以共享该按钮以转到下一个视图。
但如何添加一个'返回'按钮,以便我可以从2-1或3-2切换,并且该按钮不应该在第一个视图中看到? 是否有其他方式切换视图而不共享相同的工具栏按钮?
I add 3 views for an application and they need to switch from 1-2-3.
Now I add a toolBar and a button 'OK' on the bottom of SwitchViewController, so they can share the button to go to next view.
But how to add a 'Back' button so that I can switch from 2-1 or 3-2 and the button shouldn't be seen in the first view? Are there any other ways to switch views without sharing the same tool bar button?
原文:https://stackoverflow.com/questions/584790
最满意答案
我不确定我理解你的问题,但是如果你的意思是两个表将引用第三个表,那么它是可能的,但如果你的意思是在表之间连接多对多,那么你将创建另一个表来保存两个外键。
I'm not sure that I understand your question but if you mean two tables will reference a third table it is possible but if you mean connection of many to many between tables then you will have create another table which will hold both foreign keys.
相关问答
更多-
按照Travis Leleu的建议 - 因为这是一个好主意,无论如何。 然后将枚举字段添加到名为table_id的Addresses表中。 table_id字段的值可以是“customer”,“vendor”,“contact”,以及任何其他表将链接到地址表。 还包括一个名为entity_id外键。 此外键将是相应客户,供应商或其他任何东西的主键。 例如,当您想要某个供应商的帐单邮寄地址时,请添加$conditions数组: 'Address.entity_id'=>'123456' 'Address.ta ...
-
如何在ERD数据库图中表示多个类似的外键?(How represent multiple similar foreign keys in ERD database diagram?)[2023-02-16]
三行,像这样: Three lines, like this: -
我不确定我理解你的问题,但是如果你的意思是两个表将引用第三个表,那么它是可能的,但如果你的意思是在表之间连接多对多,那么你将创建另一个表来保存两个外键。 I'm not sure that I understand your question but if you mean two tables will reference a third table it is possible but if you mean connection of many to many between tables then ...
-
关于多个一对多关系和外键的数据库设计问题(Database design question regarding multiple one-to-many relationships and foreign keys)[2022-02-25]
过去曾经为我工作过的东西有一个context和context_id字段。 上下文将是父记录(例如教师),并且context_id将是其ID。 所以,你会有类似的东西 teacher = find single teacher by id addresses_for_teacher = find all addresses with context = 'teacher' and context_id = teacher.id 通过适当索引的表格和memcached的健康服务,我们在Cork上看到了不错的结 ... -
您可以使用FEDERATED存储引擎执行此操作。 您所做的是使用FEDERATED引擎创建本地表,而FEDERATED引擎又连接到远程系统以解析查询。 不过,我不知道这个的表现。 更好的方法可能是重新考虑应用程序数据模型。 我可以理解为什么你想为复杂系统中的每个模块建立单独的数据库,但是当你想要共享一些表数据时会很难。 如果对一个模块中强制执行的数据引入一些限制而在另一个模块中执行某些限制,那么维护将更加困难。 我认为解决方案是分离对数据的担忧。 让每个模块都有自己的数据库,但不要让模块查询其他数据! 如果 ...
-
为什么有必要在数据库中显式指定外键和引用?(Why is it necessary to explicitly specify foreign keys and references in databases?)[2021-09-06]
没有必要指定外键关系。 这只是一个好主意。 指定关系时,数据库可确保关系完整性。 也就是说,它确保外键列中的值是合法值。 此外,在更新或删除值时,外键上的cascade选项是一个很大的帮助。 It is not necessary to specify foreign key relationships. It is just a good idea. When you specify the relationship, the database ensures relational integrity. ... -
SQLite的内置外键约束不适用于数据库。 唯一的解决方法是手动编写检查约束和执行相同检查的触发器。 SQLite's built-in foreign key constraints do not work across databases. The only workaround would be to manually write check constraints and triggers that do the same checking.
-
mysql - 将一个外键引用到多个可能的主键(mysql - referencing one foreign key to multiple possible primary keys)[2023-01-13]
您的表格points和lines应包含metadata的外键 - 而不是相反。 这样做可以避免定义任何更复杂的表设置。 使用这种方法,对于许多不同的点或线,可以多次重复使用单个metadata条目。 这甚至不是MySQL特有的,而是一般的标准化数据库结构。 Your tables points and lines should contain a foreign key to metadata – not the other way around. Doing so will save you from d ... -
没关系,我自己已经弄清楚了。 当我在示例部分中查看http://db.apache.org/derby/docs/10.2/ref/rrefsqlj13590.html时,对解决方案有了一些线索。 对于来自不同表的每个外键,应该有不同的约束。 它应该是这样的: CREATE TABLE student_list (course_id VARCHAR(6) NOT NULL, semester VARCHAR(6) NOT NULL CONSTRAINT sem_constraint2 CHECK (seme ...
-
MySQL多个外键(MySQL multiple foreign keys)[2023-01-24]
我想建议以下设计(很像你的): 首先,我们将有三张桌子 USER -- UserId, other fields COMPANY -- CompanyId, other fields PHONE -- PhoneId, PhoneNumber 然后有两个表来存储关系 COMPANY_PHONE -- CompanyId, PhoneId USER_PHONE -- UserId, PhoneId I do like to suggest the following design(much like yo ...