如何使登录屏幕像Facebook应用程序? [英] How to make a login screen like Facebook app?

查看:132
本文介绍了如何使登录屏幕像Facebook应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用电子邮件和密码文本框来创建登录屏幕,如Facebook应用程序?

How can I make a login screen like the Facebook app with "Email" and "Password" textfields?

Facebook登录

真的是新的iOS编程,对不起,如果这是一个容易的问题。

I'm really new to iOS programming, sorry if this is an easy question.

推荐答案

首先你必须了解 UIView s和 UIViewController 的创建和管理。

First of all you have to understand UIViews and UIViewControllers creation and management.

问你自己,如果你想通过xib文件或编程来创建接口。第一种方法很简单。通过拖放操作,您可以在短时间内创建用户界面。第二个,对于新手来说更复杂,但我认为它可以是一个有效的解决方案来理解东西。

Then, you could ask your self if you want to create the interface through xib files or programatically. The first way is quite simple. By means of drag and drop operations you could create a user interface in a short time. The second, instead, is more complex for a newbie but I think it could be a valid solution to understand stuffs.

请注意,您在xib文件中执行的每个操作以程序化的方式完成。

Note that each operation that you do in xib files can be done programatically.

现在,我将尝试解释创建该接口所需的元素。

Now, I'll try to explain what elements you need to create that interface.

要创建如下所示的界面,您可以创建一个xib视图界面。此接口的视图是您的元素的容器。到容器视图,你可以添加一个 UITableView 和分组的风格。这个 UITableView 有2行,每一行允许通过 UITextField 输入文本。为此,您必须以编程方式创建。没有机会使用xib。

To create the interface like the following you could create a xib view interface. The view for this interface is the container for your elements. To the container view you could add a UITableView with a grouped style. This UITableView has 2 rows and each row allows to enter text by means of UITextField. To do this, you have to create it programatically. No chance to do it with xib.

可以使用两个 UIButton 创建登录和注册。

Login and signup can be created with two UIButtons. To those buttons you need to attach some actions.

最后,背景图片可以设置为容器的背景图片。

Finally the background image could be set programatically as a background image for your container.

这是一个简单的描述如何创建这样的接口。开始之前,建议您阅读以下教程:

This is a simple description on how to create such an interface. Before starting, I suggest you to read some tutorial on how to:


  1. 使用 UIView UIViewController

  2. 通过xib创建界面


  3. 使用UITableView并了解其管理

  4. 自定义或编辑UItableViewCell

  5. 使用 UIImageView 和/ $ c> UIImage

  1. Use UIView and UIViewController
  2. Create interface trough xib
  3. Interact with interface xib through outlet and actions
  4. Use UITableView and understand its management
  5. Customize or editing UItableViewCell
  6. Use UIImageView and/or UIImage

iOS应用程式开发的良好起点可以是 www.raywenderlich.com/tutorials

A good starting point for iOS application development could be www.raywenderlich.com/tutorials.

希望它有帮助。

这篇关于如何使登录屏幕像Facebook应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆