Featured
-
How Regression Testing Detects Integral Errors In Business Processes
Humans are forever changing and evolving and so to
by kristina.rigina -
Get Display Banner Advertising Opportunity on FindNerd Platform
“Do you have a product or service that nee
by manoj.rawat -
Android O Released with Top 7 New Features for App Developers
Android was founded by Andy Rubin, Rich Miner, Nic
by sudhanshu.tripathi -
Top 5 Features That Make Laravel the Best PHP Framework for Development
Laravel is a free open source Web Framework of PHP
by abhishek.tiwari.458 -
Objective C or Swift - Which Technology to Learn for iOS Development?
Swift programming language is completely based on
by siddharth.sindhi
Tags
How to set random numbers from an array as title of UIButton in iOS?
Hi Reader’s,
This blog includes the concept of how to set random numbers from an array as title of different UIButton taken in story board. Random numbers are much needed if you are making a number based gaming applic...
Passing data using NSNotificationCenter
There are different ways for passing data between controllers in Objective-C. In this example we are going to use NSNotificationCenter for passing data from one view controller to another view controller. NSNotificationCenter is generally used to...
Send e-mail in iOS
Email application of iOS device helps in sending emails. We can compose Email using MFMailComposeViewController in iOS.
A standard interface that manages the editing and sending of email message is provided by the MFMailComposeViewController cla...
How to check if text is truncated in UILabel?
Hello all ! Sometimes it happens that the content is more according to the size of UILabel then the three dots appears at the end of the UILabel. So we want to show the complete text of the UILabel. We can implement it by adding a UIButton, on cl...
Glow UIButton titleLabel on selection of UIButton
Hi all ! If we want to show the glowing effect on the UIButton i.e when you are selecting the UIButton then the titleLabel will glow and when its not selected the titleLabel will again come to its original color.
Here is an example which shows...
How to use the built-in camera of the iPhone ?
To use the built-in camera of the iPhone consider the following example. In this example we will also see how to access the photo library and select a photo and use it.
Create a single view application and assign a name to it. Then in the Main...
Line Break on UIButton Text
It is possible to set number of lines of a label by going to the Attribute Inspector and assigning value 0 to the lines attribute.
In case of Text Field we can use Text View but if we are using UIButton then there is no option for the mu...
How to add Gradient effect to UIButton ?
Hello all !
For adding Gradient effect to the UIButton we can implement the following code :-
CAGradientLayer *gradientLayer = [CAGradientLayer layer];
gradientLayer.frame = _customButton.layer.bounds; // _customButton is the outlet ...
Change background color of uibutton using subclass method
Hello all !
Explanation is,
Suppose we want to change the background color of the UIButton when it is selected and when reSelected change it to the default colour.
There are many methods for doing so and one of them I am explaining below :-
...
How to give border color to UIButton in objc and Swift.
To give border color to UIButton :-
1. Take UIButton as property .
2. Give corner radius and corner width to UIButton.
3. Now give border color to UIButton.
For Swift use :-
demoButton.backgroundColor = UIColor.clearColor()
demo...
Change the button background color when highlighted in swift
To create a button at run time in swift please use the followin code:
this code will help you in creating a button at run time. and also change the background color of the button in highlihted State..
To change the button background at the tim...
Set Dynamic Size of button according to the Title text
if you want to change the size of UIButton according to the title text then use the following function--
-(void)setDynamicSizeOfButton:(UIButton *)button andSize:(CGFloat)Size {
CGSize size = [button.titleLabel.text sizeWithAttributes:
...
How to create a UILabel & UIButton programmatically in Swift
hello friends,
this is how we can create a UIButton and UILabel in swift.
Set a UILabel in swift
var label = UILabel(frame: CGRectMake(100, 100, self.view.bounds.size.width, 50))
label.center = self.view.center
la...
UIButton width according to Title text.
We can increase or set width of a UIButton according to button title test. To set the width of a UIButton use CGSize. Here is the code :-
CGSize stringsize = [yourButton.titleLabel.text sizeWithFont:[UIFont systemFontOfSize:17]];
[yourButto...