Is there any convention about iOS forms

I've been searching for a while now and didn't find the right answer for my question about iOS forms, that is:

Studying some iOS forms, I discovered 02 main styles for forms's title and placeholders. The first one groups multiple forms in one box-like shape with both, titles and place holders inside(look image 01).

Style 01

The second one separate forms with titles outside and placeholders inside(look image 02).

Style 02

I would say myself that the first one is good for long forms(3+ itens) and the second for short ones(1-2 itens).

Is there any convention to use one or the other?

Thanks in advance,