Posts

Counter function for adding item in cart and select the item in the list

 Hii Friends , In this Blog  I am going to explore how can we make custom counter. the counter is very important in a Application and if you are going to develop a e-commerce application or and application in which you have to show the count of item you must have to use counter to count the item , I recently use counter for my application that is  similar  to Zomato application , in this application user can add the food in the cart so i need to counter to show how much item user has selected, this is very simple Program suppose you have a list of item which you want to select, from that list you pick some item in some quantity first you have to select the item which user tapped then you send the item in the parameter of function and implement the function design your view according to your need use two Touchableopacity for Plus and minus icon and one text to show the count of item, here is the simple function: - // function to select the item and perform action acco...

Simple function to Encryption on Mobile No,email id or any user information in react-native

Image
 Hii, EveryOne , today i am going to write a simple java script function , in which we change the format of number, suppose you get a mobile number form back-end or from the user and now you want to encrypt that number , mobile no is  - 9876543210 and you have to show the number in the following format mobile no is - 98XXXXXX10 , if you are beginner in mobile application development  you see this kind of situation,  so here is the function with the help of the this function you can handle the situation like this, you can convert e-mail, mobile no, card no, name and any user information , const changeTheNumber=(number)=>{ var newNum = number.toString() var res = ''; for(var i = 0; i<newNum.length; i++){ if (i > 1 && i < 8){ res = res + newNum[i].replace(newNum[i],'X') //console.log(res) }else { res = res + newNum[i] } } //console.log(newNum) //co...
Image
                                    Age Calculator Application In React Native In this Blog we are going to develop a  Application in React-native in  which user enter there date of birth and get their age  run following command to Create Project npx react-native init AgeCalculator now project is create in the folder  import moment from "moment"; now do some magic   import React,{ Component }from 'react'; import {View,Text,TouchableOpacity,TextInput,Platform,} from 'react-native'; import moment from "moment"; export default class HomeScreen extends Component {   constructor(props){     super(props)       this.state={         age: 'Age',         dateofbirth: ' ',    ...

React-native pop up ,React-native Pop up hide on the touch of outside the pop up,

Image
Hide the Modal on the touch of outside the view Working with react-native there are many cases when you want and need to show the pop up,like when verification is done of password, Otp verification or you want to make custom Drop dwon and many other cases, and all these case you want on touch of out side the pop-up, pop-up should be dismiss, you can do this with the help of Modal in react-native, you can mangae the touch of out side the view and in side the view both , we can use the touchablewithoutfeedback but with the help of touchablewithoutfeedback you can't stop the touch of inside, if you use touchablewithoutfeedback and your user touch inside the view your view will be disapper, In this Post we learn how to manage the touch out side and inside the view:-   first of all import Modal from the react-native  import{Modal,View,TouchableOpacityWithOutFeedBack,Text}  After Importing the Modal set the state -  *if Your are using the Class component:- constructor(prop...

ios application life cycle

Image
Every iOS Developer, should know application lifecycle. Application lifecycle helps to understand overall app behaviour. The main point of entry into iOS apps is UIApplicationDelegate . UIApplicationDelegate is a protocol that your app has to implement to get notified about user events such as app launch, app goes into background or foreground, app is terminated, a push notification was opened, etc. Application Lifecycle Example: When an iOS app is launched the first thing called is application: willFinishLaunchingWithOptions:-> Bool . This method is intended for initial application setup. Storyboards have already been loaded at this point but state restoration hasn’t occurred yet. Launch application: didFinishLaunchingWithOptions: -> Bool is called next. This callback method is called when the application has finished launching and restored state and can do final initialization such as creating UI. applicationWillEnterForeground: is called...

compound assignment operator , swift basic operator , comparison operator , ternary conditional operator , simplyprogrammingIDEA.

Image
# Swift basic operator  In the last blog we start reading swift programming basic operator , we see all about operator and assignment and arithmetic operator in details. And in this blog we see some remaining operator . Compound assignment operator  In compound assignment operator we use ( = ) with other operator. var a = 5 print(a)       // 5 a += 2   the a += 2 is work as a = a + 2 and give the result of a + 2. print(a) // 7 a -= 4 print(a) // 3 Comparison Operators In swift there is comparison operators to compare . swift support all the standard comparison operaors. ·        (a == b) equal to operator ·        (a != b) not equal to operator ·        (a < b ) less than operator ·        (a > b) greater than operator ·        ( a >= b )...

Operator in the swift programmign languaga

Image
#Basic Operator in Swift Programming. Operator is special symbol that is use to change , combine and perform the task on the given value. For example ( + ) is arithmetic operator use to add two numbers. Swift gives almost all the operator that is present in the c programming language. Swift provide the range operator that is not present in the c programming. 1…2 , a..<b , it is used to show the range of value. In this blog we are going to see common   operator and learn to use them and try to   build programming_idea. Terminology There are tree type of the operator in all the programming language , unary , binary and ternary. ·        unary operator is performed operation on the single operand.( - a ) , unary prefix operator need just before(!a) the operand and unary postfix operator need to keep just   after the operand(a+) ·        Binary operator need two operand to perform the opera...