首页 \ 问答 \ iOS TableViewController在状态栏下滚动内容和导航栏(iOS TableViewController Scrolling away content and navigation bar under status bar)

iOS TableViewController在状态栏下滚动内容和导航栏(iOS TableViewController Scrolling away content and navigation bar under status bar)

我正在使用TableViewController ,我在顶部添加了自己的导航栏以匹配我拥有的其他tabBar页面。

带导航栏的tableviewcontroller

我不得不在顶部放置一个空视图来降低表视图的起点,这样它就不会覆盖我的navBar ,这已经很烦人了。

现在它看起来很好,只是当我向上滚动列表时, navBarTableView进入状态栏。

我希望我的navBar保持navBar ,滚动时TableView不要进入状态栏。

为了开始我不能在我的场景中添加任何其他东西,如果不是在表视图下,我得到那导致导航栏跟随tableview,这是问题的一部分..

场景的层次结构

Xcode 7.1 swift 2.0 iOS 9


I'm using a TableViewController and I've added my own navigation bar on top to match the other tabBar pages that I have.

tableviewcontroller with nav bar

I had to place at the top an empty view to lower the starting point of the table view so it wouldn't cover my navBar, which was already annoying.

Now it looks fine except that when I scroll up my list both navBar and TableView go under the status bar.

I want my navBar to stay where it is and the TableView not to go under the status bar when scrolling.

For starting I can't add any other stuff in my scene if not under the table view and i get that that's causing the nav bar to follow the tableview up so that's part of the problem..

hierarchy of the scene

Xcode 7.1 swift 2.0 iOS 9


原文:https://stackoverflow.com/questions/33582824
更新时间:2024-02-15 21:02

最满意答案

在node.js中编写应用程序的所有业务逻辑是否常见?

将node.js用于REST接口和所有业务应用程序逻辑是很常见的。 除非你已经有一堆用其他语言编写的代码或其他令人信服的理由使用另一种语言的代码,否则你可以在node.js中直接实现核心逻辑,而不是将更多的动作部分引入拼图。

如果我使用node.js构建其余服务并将业务逻辑放在另一种语言中(例如:Python,Java,Ruby),如何集成它们?

集成它们有很多选择,它实际上取决于你正在做什么。 您可以让node.js中的REST接口为每个请求以另一种语言运行另一个进程,或者您可以在服务器上运行另一个进程,您可以使用任何可用的进程间通信技术(套接字,http请求等)进行通信。 )。

关于node.js的许多文章都引用了一些NoSQL DB,比如MongoDB。 使用带有RDBMS的node.js(如Mysql或Postgres)是不是很糟糕?

选择数据库应该是将数据库的类型与您的特定需求相匹配,并且几乎不需要使用您正在编码的语言。您通常可以使用任何语言的任何主流数据库。 因此,请根据您的需求选择最适合您的数据库,而不是根据您编写的语言。

将node.js与RDBMS一起使用并不是一个坏习惯,只要这是满足您需求的最佳数据库类型。


Is it common to write all business logic of application in node.js?

It is common to use node.js for both the REST interface and all the business application logic. Unless you already have a bunch of code written in some other language or some other compelling reason to use code in another language, then one may as well just implement the core logic right in node.js and not introduce more moving parts into the puzzle.

If I use node.js to build the rest service and put the business logic in another language (e.g: Python, Java, Ruby), how to integrate them?

There are many choices for integrating them and it really depends upon what you're doing. You could have the REST interface in node.js run another process in another language for each request or you could have another process on your server already running that you would communicate with using any interprocess communication technique available (sockets, http requests, etc...).

Many articles about node.js refer to some NoSQL DB, like MongoDB. Is it a bad practice use node.js with a RDBMS (like Mysql or Postgres)?

Choosing a database should be about matching the type of database to your particular needs and should have little to do what what language you are coding in. You can generally use any mainstream database from any language. So, choose the database based on the best fit for your needs not based on what language you're coding in.

It is not a bad practice to use node.js with an RDBMS as long as that's the best type of database for your needs.

相关问答

更多
  • http.ServerResponse类http.ServerResponse实现Writable Stream接口,请参考http.ServerResponse API https://nodejs.org/api/http.html#http_class_http_serverresponse和https://nodejs.org/api/stream.html#stream_class_stream_writable_1 。 所以你只需要在发送示例代码“getFileToStream” http:// ...
  • restify是一个专门为构建正确的REST Web服务而构建的node.js模块。 http://mcavage.github.com/node-restify/ Express更直接针对完整的Web应用程序(呈现HTML等)。 Restify仅适用于Web服务。 此外,创建Restify的人在Joyent工作,Ryan Dahl开发了Node.js(这是一种保证质量)的公司。 restify is a node.js module built specifically to enable you to ...
  • 您可以使用REST客户端,请参阅Oracle文档和示例 。 通常,这意味着您必须启动具有其他配置的专用代理节点,请参阅部署指南 clear。 我们在生产中使用Grizzly作为Web服务器。 当然它会比本机tcp客户端慢,所以你需要进行一些性能测试。 You can use REST client, see Oracle documentation with example . generally it means that you'll have to start a dedicated Proxy No ...
  • 首先是通常流程的“图表”: Client | v Request | v ...
  • 你的unirest调用应该在你的module.exports.getProducts方法中。 由于调用是异步的,您不能只是从它return 。 你需要某种回调。 module.exports.getProducts = function(callback) { unirest.get(host + '/api/products?_format=json') .headers({'Accept': 'application/json', 'Content-Type': 'applica ...
  • 是的,可以,按照以下命令: npm install railway railway init rest-app && cd rest-app && npm install railway generate scaffold resource property1 property2 railway server 3000 而已! 如果需要生成嵌套资源: railway generate resource.nestedresource propertyForNestedResource 并修改config ...
  • 实际上它很简单。 我要做的是简单地将前端的Angular 2应用程序和后端的Node.Js API视为独立项目。 它们很可能会在不同的提供程序上运行(例如,针对Angular 2应用程序的Firebase和针对Node.js服务器的Heroku),因此将它们作为具有独特依赖关系的2个不同项目来处理它们是有意义的。 我最近做了一个类似的项目,在后端使用Angular 2 + webpack作为前端和Django: https : //github.com/damnko/angular2-django-movi ...
  • 将您的Web应用程序逻辑保存在PHP中是完全有意义的。 这就是PHP擅长的,将它移植到node.js代码可能是一种浪费和痛苦的经历。 另一方面,Node擅长网络连接和长期连接,例如WebSockets(socket.io,SockJS等)。 因此,使用聊天服务器也是有意义的。 我建议你同时使用它们,因为它们中的每一个都解决了它擅长的特定问题。 您可以使用某种消息队列轻松连接它们。 It totally makes sense to keep your web application logic in PHP ...
  • 在node.js中编写应用程序的所有业务逻辑是否常见? 将node.js用于REST接口和所有业务应用程序逻辑是很常见的。 除非你已经有一堆用其他语言编写的代码或其他令人信服的理由使用另一种语言的代码,否则你可以在node.js中直接实现核心逻辑,而不是将更多的动作部分引入拼图。 如果我使用node.js构建其余服务并将业务逻辑放在另一种语言中(例如:Python,Java,Ruby),如何集成它们? 集成它们有很多选择,它实际上取决于你正在做什么。 您可以让node.js中的REST接口为每个请求以另一种 ...
  • node.js支持AJAX调用吗? Ajax是使用JavaScript从浏览器发出HTTP请求而不离开页面的过程。 由于Node(在WWW的上下文中)通常在服务器上运行,因此通常不会这样做。 您可以: 使用Node运行HTTP服务器,并让客户端JavaScript使用Ajax向该服务器发出请求 驱动浏览器(例如通过PhantomJS或Selenium)并加载一个页面,使浏览器执行Ajax调用 从Node发出HTTP请求 由于是服务器端,node.js不必触发AJAX,因为它需要调用其他服务器。 一台服务器与 ...

相关文章

更多

最新问答

更多
  • python的访问器方法有哪些
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。
  • 响应navi重叠h1和nav上的h1链接不起作用(Responsive navi overlaps h1 and navi links on h1 isn't working)
  • 在C中读取文件:“r”和“a +”标志的不同行为(Reading a File in C: different behavior for “r” and “a+” flags)
  • NFC提供什么样的带宽?(What Kind of Bandwidth does NFC Provide?)
  • 元素上的盒子阴影行为(box-shadow behaviour on elements)
  • Laravel检查是否存在记录(Laravel Checking If a Record Exists)
  • 设置base64图像的大小javascript - angularjs(set size of a base64 image javascript - angularjs)
  • 想学Linux 运维 深圳有哪个培训机构好一点
  • 为什么有时不需要在lambda中捕获一个常量变量?(Why is a const variable sometimes not required to be captured in a lambda?)
  • 在Framework 3.5中使用服务器标签<%=%>设置Visible属性(Set Visible property with server tag <%= %> in Framework 3.5)
  • AdoNetAppender中的log4net连接类型无效(log4net connection type invalid in AdoNetAppender)
  • 错误:发送后无法设置标题。(Error: Can't set headers after they are sent. authentication system)
  • 等待EC2实例重启(Wait for an EC2 instance to reboot)
  • 如何在红宝石中使用正则表达式?(How to do this in regex in ruby?)
  • 使用鼠标在OpenGL GLUT中绘制多边形(Draw a polygon in OpenGL GLUT with mouse)
  • 江民杀毒软件的KSysnon.sys模块是什么东西?
  • 处理器在传递到add_xpath()或add_value()时调用了什么顺序?(What order are processors called when passed into add_xpath() or add_value()?)
  • sp_updatestats是否导致SQL Server 2005中无法访问表?(Does sp_updatestats cause tables to be inaccessible in SQL Server 2005?)
  • 如何创建一个可以与持续运行的服务交互的CLI,类似于MySQL的shell?(How to create a CLI that can interact with a continuously running service, similar to MySQL's shell?)
  • AESGCM解密失败的MAC(AESGCM decryption failing with MAC)
  • SQL查询,其中字段不包含$ x(SQL Query Where Field DOES NOT Contain $x)
  • PerSession与PerCall(PerSession vs. PerCall)
  • C#:有两个构造函数的对象:如何限制哪些属性设置在一起?(C#: Object having two constructors: how to limit which properties are set together?)
  • 平衡一个精灵(Balancing a sprite)
  • n2cms Asp.net在“文件”菜单上给出错误(文件管理器)(n2cms Asp.net give error on Files menu (File Manager))
  • Zurb Foundation 4 - 嵌套网格对齐问题(Zurb Foundation 4 - Nested grid alignment issues)
  • 湖北京山哪里有修平板计算机的