Juanjo
Juanjo

Reputation: 969

Labels with targets to another view

I would like to have a login similar to this screenshot:

Screenshot

The problem is that I don't know how to do the bottom, these two options. When I push, I'd like to put another view — the sign up view or reset password view —, but I don't know how to do these elements (are they labels?).

Upvotes: 0

Views: 97

Answers (4)

NANNAV
NANNAV

Reputation: 4901

//using   UITapGestureRecognizer to easy to set target to another view

 UITapGestureRecognizer *tab_1 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(action_1)];
    tab_1.delegate = self;
    [label1 addGestureRecognizer: tab_1];

    UITapGestureRecognizer *tab_2 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(action_2)];
    tab_2.delegate = self;
    [label2 addGestureRecognizer: tab_2];

    -(void)action_1{
    //your action or view;
    }

    -(void)action_2{
    //your action or view;
    }

Upvotes: 1

IronManGill
IronManGill

Reputation: 7226

To make this, First you take a UILabel to show the "Tumblr" option. Then you create a UITableView. This TableView would contain 2 sections like "Email" and "Password". Make the edges of the UITableView as rounded using

TableView.layer.cornerRadius = 10;

Now to push to another view you can simply write any data in the UITableViewCells in

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

and using the

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath

you can pass that information to the next view for the reset password option you mentioned likewise. Create a UIButton and name it as "Login".

I this is what you wanted to achieve ?? Any doubts please tell. Thanks :)

EDIT:

For the options below what you can do is that make the UIButtons as custom and write their text as "Reset Password" etc. Then on their click you can open a presentModalViewController of each of the next view's or in the same view itself, in which you would be able to do your sign in and reset stuff. Hope it helps !!!

Upvotes: 2

Omarj
Omarj

Reputation: 1159

It is a label and you link it with the action method.

Upvotes: 1

Rui Peres
Rui Peres

Reputation: 25917

They could be UIButton with the type Custom and with a value for the text:

enter image description here

Upvotes: 3

Related Questions