Program to Find the largest number in an array of data in 8085 Microprocessor

Rishi Rathor
Published on 22-Jan-2019 14:10:11
In this program we will see how to find the largest number from a block of bytes using 8085.Problem StatementWrite 8085 Assembly language program to find the largest number from a block of bytes.DiscussionIn this program the data are stored at location 8001H onwards. The 8000H is containing the size ... Read More

How to draw a route between two locations using MapKit in Swift?

Vrundesha Joshi
Published on 21-Jan-2019 17:12:20
To draw a route between two Locations on map we need to have co-ordinates of both those locations.Once we have the co-ordinates of both locations we can use the below given function to show the line between two points on map. In this example I’ll be using two random location ... Read More

How to programmatically add a UISegmentedControl to a container view?

Rishi Rathor
Published on 21-Jan-2019 17:09:29
To add a UISegmentControl in iOS with swift we’ll have to first create a segment control and it’s controller function, i.e. it’s action. Let’s see those steps.Let’s create a function to add a segmented control.func addControl() {    let segmentItems = ["First", "Second"]    let control = UISegmentedControl(items: segmentItems) ... Read More

How to change a button background color using Swift?

Rishi Rathor
Published on 21-Jan-2019 17:07:08
To change the background color of a button in iOS application we need to access the property ‘ backgroundColor’ of the UIButton. We can do this in two ways, programmatically and using the storyboard.Method 1 − Using the storyboard editorAdd a button on your storyboard, select it Go to it’s ... Read More

How to open and close a PDF file using Swift?

Anvi Jain
Published on 21-Jan-2019 17:03:08
In this article we’ll see how to open a pdf file using swift in iOS. Here we’ll do it with an example of opening pdf in webView in iOS. Let’s create a project and add WKWebView to the storyboard.Connect it’s outlet to the ViewController class.Now we’ll see two different thingsOpening ... Read More

How to make iPhone vibrate using Swift?

Anvi Jain
Published on 21-Jan-2019 16:59:53
To make an iPhone vibrate using swift we’ll use two different methods. First create a new project and add Four different buttons to the main View controller.Now import the AudioToolbox framework in your view controller class.For the first button add an action and write the following code as shown below:@IBAction ... Read More

How to replace a character in Objective-C String for iPhone SDK?

Vrundesha Joshi
Published on 21-Jan-2019 16:58:04
To replace a character in objective C we will have to use the inbuilt function of Objective C string library, which replaces occurrence of a string with some other string that we want to replace it with.To create a string in objective C we need to write −NSString *str = ... Read More

How add 1 day to Date in swift?

Rishi Rathor
Published on 21-Jan-2019 16:50:37
To 1 day to a date in swift we need to create a date first. Once that date is created we have to add specific days to it. In this example we’ll see how we can achieve the same.Let’s create a date first, let it be today, let today = ... Read More

How to download a video using a URL and save it in an photo album using Swift?

Jennifer Nicholas
Published on 21-Jan-2019 16:49:00
To download a video from a URL in swift we need to perform a few steps while keeping a few things in mind.Points to be noted here are, We’ll be making use of internet to download video, hence we need to allow permissions for App transport security in our Info.plistWe’ll ... Read More

How to Add Live Camera Preview to UIView in Swift?

Anvi Jain
Published on 21-Jan-2019 16:46:03
To add a live camera preview to our default UIView in swift we can either use AVFoundation framework of iOS SDK or native UIImagePickerController(). In this example we’ll be using ImagePicker as our aim is to present camera preview on the UIView and Imagepicker is suitable for that task. AVFoundation ... Read More