kev
kev

Reputation: 2346

How to create custom iOS View

enter image description here

I'm looking to create a custom UIView (like the above realtor.com app) so when the user selects send email or something to that effect a little view pops up confirming the action then disappears. Any direction, tutorials or code snippets would be greatly appreciated. Also what is the correct terminology of what I'm looking to do? Please excuse my ignorance on this subject.

Upvotes: 0

Views: 229

Answers (4)

SachinVsSachin
SachinVsSachin

Reputation: 6427

Here you can find the source code for showing toast like android

https://github.com/scalessec/Toast

Upvotes: 0

iPatel
iPatel

Reputation: 47059

Use Custom UIActivityIndicator that you can found in this link

https://github.com/jdg/MBProgressHUD

This is not Apple specific controls. You can create them. The pop up shown in first image is very easy to make. You'll have to use 3 controls to make it.

1) Background UIImageView with the image.

2) UIActivityIndicatory

3) UILabel with whatever message you want to display.

MBProgressHUD is an iOS drop-in class that displays a translucent HUD with an indicator and/or labels while work is being done in a background thread. The HUD is meant as a replacement for the undocumented, private UIKit UIProgressHUD with some additional features.......
There is more option that useful for your work, For mor information go to above Link

Upvotes: 2

Ravindra Bagale
Ravindra Bagale

Reputation: 17655

yes you can customize,go throgh below steps

1)add selector to your sendEmail button

2)in that selector function create one view, and add your emailSent image as a background

3)now add this view to mainView simply by addSubView

or for nice than above

1)add selector to your sendEmail button

2)in that selector function create one UIControl of size 480 x320, and add a imageView to it & if you want also can add one ok button

3)now add selector for UIControl, in that selector function just remove your view from sperView

4)now add UIcontrol to mainView

Upvotes: 0

Richard Brown
Richard Brown

Reputation: 11436

Why not use something that's already available? Take a look at ZAActivityBar (https://github.com/zacaltman/ZAActivityBar) which handles creating 'toast'-like popups.

It's a part of CocoaPods, so it's very easy to install.

Upvotes: 0

Related Questions