Search Your Question

What is MLKit?

Ans : 

ML Kit is a mobile SDK that brings Google's machine learning expertise to Android and iOS apps in a powerful yet easy-to-use package.

Use : 

  • Text Recognition API to detect text in images 
  • Face Contour API to identify facial features in images 
  • Cloud Text Recognition API to expand text recognition capabilities (such as non-Latin alphabets) when the device has internet connectivity .
  • Learn how to host a custom pre-trained Tensor Flow Lite model using Firebase 
  • Custom Model API to download the pre-trained TensorFlow Lite model to your app Use the downloaded model to run inference and label images

What is handshaking process?

Ans :

Handshaking is an automated process that sets parameters for communication between two different devices before normal communication begins. Much like the way a human handshake sets the stage for the communication to follow, the computing handshake provides both devices with the basic rules for the way data is to be shared between them. These rules can include transfer rate, coding alphabet, parity, interrupt procedure and more.

What is Enumeration in Swift?

Ans : 

What is enum?
An enumeration defines a common type for a group of related values and enables you to work with those values in a type-safe way within your code.
Enumerations offer an easy way to work with sets of related constants. An enumeration, or Enum, is a symbolic name for a set of values. Enumerations are treated as data types, and you can use them to create sets of constants for use with variables and properties.

When to use an enum?
Whenever a procedure accepts a limited set of variables, consider using an enumeration. Enumerations make for clearer and more readable code, particularly when meaningful names are used.

The benefits of using enumerations include:

  • Reduces errors caused by transposing or mistyping numbers. 
  • Makes it easy to change values in the future. 
  • Makes code easier to read, which means it is less likely that errors will creep into it. 
  • Ensures forward compatibility. With enumerations, your code is less likely to fail if in the future someone changes the values corresponding to the member names.



What are the app id and bundle identifier?

Ans : 
Bundle ID : 
A bundle ID or bundle identifier uniquely identifies an application in Apple's ecosystem. This means that no two applications can have the same bundle identifier. To avoid conflicts, Apple encourages developers to use reverse domain name notation for choosing an application's bundle identifier.
i.e com.iosiqa.newapp or com.iosiqa.app.new

App ID : App ID consists of Team ID + Bundle ID. Team ID is provided by apple to one team in developer account.
i.e ABC12345.com.iosiqa.newapp

What is use of APP ID? 
Whenever you want to enable a capability or application service for your application, you enable that capability for the App ID your application is linked to. This used to be tedious, requiring a visit to Apple's developer website. Xcode has evolved quite a bit over the years and it takes care of the details most of the time.

How To declare custom tableview cell? What Is The Use Of dequeuereusablecellwithidentifier ?

Ans : 

Let's create custom cell :

1. Take viewcontroller or tableviewcontroller
2. In Tableview, put one uitableviewcell and change style to custom.
3. Give any string (i.e "newcell") to reuseidentifier of cell in attribute inspector.
4. Put labels, textfields, views in cell according to your need.
5. Add new file named as newCell.swift that inherit from UITableViewCell.
6. Select your cell and give class name newCell.
7. Now you can make outlet of that cell in newCell.swift.

Here magic will be created using dequeuereusablecellwithidentifier : 

The best part of using dequeueReusableCellWithIdentifier is that using this you can re-use your cells.

Imagine if your table has 1000 entries. Now, if for each entry a table cell would be created then for 1000 entries, 1000 tableview cells and memory allocation for 1000 tableview cells.

App will be slowed down or would crash if the entries goes beyond 1000.

When we use, dequeueReusableCellWithIdentifier, the tableView just creates exactly the number of cells based on your table height and cell height. Suppose, if it shows 4 cells in the tabelView and rest you can see by scrolling, then memory for only 4 cells would be allocated at any given point of time.

Now, when you will scroll the tableView, it will re-use the same cell but will change the cell content (data) based on your data source.

Hope this clears your doubt.

Code

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    UITableViewCell *cell =[tableView dequeueReusableCellWithIdentifier:"newcell"];
    cell.textLabel.text = @"Test";
    return cell;

}