Use UIGestureRecognizer for Different Touch Events

Use UIGestureRecognizer for Different Touch Events

UIGestureRecognizer class recognizes a sequence of touches & performs on basis of the recognizer. Here is the list of different gesture events.

It’s more useful for adding action events for controls which don’t contain default actions like UIButton.

UITapGestureRecognizer :

Its used for handle single or multiple taps.

UITapGestureRecognizer *gest = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(gestureTapped:)];

gest.delegate = self;

[view addGestureRecognizer:gest];

-(void) gestureTapped:(UITapGestureRecognizer)sender {


UIPinchGestureRecognizer :

Its used for handle two taps simultaneously. This gesture used generally for image scaling & zooming feature.

UIPinchGestureRecognizer * gest = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(gestureTapped:)];

gest.delegate = self;

[view addGestureRecognizer:gest];

-(void)gestureTapped:(UIPinchGestureRecognizer*)sender {

sender.view.transform = CGAffineTransformScale(sender.view.transform, sender.scale, sender.scale);

sender.scale = 1;


Read more: How to Create and Setup a Prefix Header File for iOS

UIRotationGestureRecognizer :

Its used for handle rotation feature. When a user moves two fingers opposite each other circular way. It will rotate the view in the corresponding direction.

UIRotationGestureRecognizer * gest = [[ UIRotationGestureRecognizer alloc] initWithTarget:self action:@selector(rotateImage:)];

gest.delegate = self;

[view addGestureRecognizer:gest];

-(void)rotateImage:(UIRotationGestureRecognizer*)sender {

if ([sender state] == UIGestureRecognizerStateBegan || [sender state] == UIGestureRecognizerStateChanged) {

[sender view].transform = CGAffineTransformRotate([[sender view] transform], [sender rotation]);

[sender setRotation:0];



UISwipeGestureRecognizer :

Its used for handle actions on swipe. Move views on swiped direction or actions on image with swipe to remove or swipe to load new image.

UISwipeGestureRecognizer *swipe = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(didSwap:)];

switch (self.direction) {

case DirectionFromTop:

swipe.direction = UISwipeGestureRecognizerDirectionDown;


case DirectionFromLeft:

swipe.direction = UISwipeGestureRecognizerDirectionRight;


case DirectionFromBottom:

swipe.direction = UISwipeGestureRecognizerDirectionUp;


case DirectionFromRight:

swipe.direction = UISwipeGestureRecognizerDirectionLeft;



[view addGestureRecognizer:swipe];

-(void)didSwap:(UISwipeGestureRecognizer*)gesture {


UIPanGestureRecognizer :

Its used for handle dragging actions like moving images into view or moving any other objects on finger movement.

UIPanGestureRecognizer *gest = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handlePanImage:)];

[imgViewStyleOutfit addGestureRecognizer:gest];

– (void)handlePanImage:(UIPanGestureRecognizer *)sender {

static CGPoint originalCenter;

if (sender.state == UIGestureRecognizerStateBegan) {

originalCenter =;

[sender.view.superview bringSubviewToFront:sender.view];

} else if (sender.state == UIGestureRecognizerStateChanged) {

CGPoint translation = [sender translationInView:self.view]; = CGPointMake(originalCenter.x + translation.x, originalCenter.y + translation.y);



UILongPressGestureRecognizer :

Its used for handle long press events. For that user needs to press for minimum amount of time to call actions.

UILongPressGestureRecognizer *gest = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(hangleLongPress:)];

[view addGestureRecognizer:gest];

-(void)hangleLongPress:(UILongPressGestureRecognizer*)sender {

if (sender.state == UIGestureRecognizerStateBegan) {



Source Code Management Using Bitbucket

Source Code Management Using Bitbucket

What is Source Code Management & version control :

  • While working on important projects like websites, software, desktop or mobile application it becomes necessary to handle the source code at a safe place. Specifically in websites & applications requires regular updates & each time the source will be updated too. So it’s important to keep the back up of the source code.
  • Also, there are some cases where multiple persons working as a team on the same project so at that time they will work on the similar source code. So at that time its good to maintain the backup regularly so if any issue arrives at any stage we can roll back the changes or can recover from the issue by using back source.
  • Developers often keep the backup on their local systems or the generic servers where whole organization source code is maintained. Now consider a case when if any hardware issue arrives & you couldn’t be able to recover the source from the local system it can become severe issue & cost you a lot. So there would be a common solution where we should be able to manage the latest source code as well as we can manage version control.


What is Bitbucket & how it helps :

  • Bitbucket is basically a hosting service which allows you to sign in for free & allows to create repositories where you can take backup of your source code & perform some advanced operations as well
  • Storing a source code on bitbucket is not only free but it’s also a safe option. Consider if you are working on 40-50 projects where it becomes tidy for you to keep back of all of the projects on your local system. Now if you use Bitbucket, in that case, you can manage all of your source codes & keep your system free
  • What you can do is once you complete the update of your app or website then upload final source on bitbucket
  • Now later on when new version update arrives you can get the latest source from the bitbucket do modifications whatever requires & once you finish you can resubmit the changes back to the bitbucket server


Key benefits of using Bitbucket :

  • If you are an individual developer, It provides a free sign in & can upload unlimited repositories. For the organization, it provides management repositories up to 5 persons into a single team
  • Easy & quick to set up & uploads. Also can create unlimited repositories
  • It’s a safe option as it also allows you to keep your repositories private where. If you keep it private no other persons will find your repositories
  • Allows advance operations like push changes, version control

Read more: Set up UILocalNotification in iOS Swift/Objective C

If you are new to bitbucket source code management & haven’t tried it yet that you must read this carefully.

Here is step by step explanation of source code management using Bitbucket,

  • If you are new to bitbucket & haven’t signed in yet than Signup first.

  • Ok, so we have bitbucket account now next step is to make sure our system is ready for it or not. So go to Application folder & see if you have Github desktop application installed or not. If no than download it from here & install:
  • Now if you are first time uploading git repository of your source code then create a new repository on bitbucket. For that go to Bitbucket site & click on a + button on left panel & select repository & fill up the details.
  • Now repository is created & ready to receive the source code. So the next step is keeping the copy of your source code to a desktop. Note: reason, why I prefer to keep it on a desktop, is in any other path there might be a chance to have white spaces on the file path & that may not allow working some of the commands on terminal. So always prefer to keep the copy of your source code on the desktop & also make sure it’s not compressed file. Keep it unzipped.
  • Open terminal & navigate to the desktop path

$ cd desktop

  • Now go inside your project folder

$ cd project-name

  • Initialise git command like this :

$ git init

  • Add ‘.’ (dot) Reference for the first commit on your repository

$ git add.

  • Now perform initial commit by adding some text to the readme file like this (You can change text written between single quotes) :

$ git commit -m  ‘Initial commit with contributors’

  • Now its time to add repository path origin URL

$ git remote add origin your_repository_UR

Like this: $ git remote add origin https://[email protected]/MyComp/myapp.git

  • Finally, the last option is to push your source to the bitbucket server.

$ git push origin master -f

Once above steps followed it will first ask for the password of your bitbucket account for the first time only. Later on, it will be saved to your keychain account & will be accessed directly from there.

Important Tips to Test iPhone Application

Important Tips to Test iPhone Application

This blog will help you out to improve your professional testing ability as a mobile application tester.

Even if you are not a professional tester & working as a developer but you want to make sure the test beta released by you does not come back with bunch of bugs & issues list than you can refer this blog & it will help you out to improve your application testing skills & eventually it will help you out to make bug free & seamless mobile experience.

Usually, this happens when tester reports any bug on application but does not provide required enough information to the developer & as result developers are not been able to detect the bug & that creates a communication gap.

So to overcome this issue here are few points that need to be in consideration while testing iOS Application.

Do always provide crash logs :

  • This is the very basic & initial step that every iOS Application tester should follow is while reporting bugs they must provide it with the crash logs.
  • In iPhone settings, it automatically stores crash logs of the application. Through that crash logs, a developer can easily detect the lines of code which causes the crash
  • To find the crash logs go to Settings -> Privacy -> Diagnostics & Usage -> Diagnostics & Usage Data. You will find a list of logs there & the recent log will be on the top sorted by the application name.
  • You can retrieve this log file by connecting your device with the computer & sync with iTunes

Do test under limited memory availability on a device :

  • To perform such testing you can test on the devices with lowest configurations or you can create such environment by increasing the usage on the device. For that, you can open all of the applications on the device & also use browser of the device & open few tabs with a couple of websites open
  • So that will consume the memory of device & that will create an environment for you to better test application on such environment
  • This will allow you to check how an application performs on lower memory conditions & in case of low memory availability it gives appropriate messages or throws exceptions

Data inputs testing :

  • In application, if you find a form fill up the view that has more chances of bugs, glitches. So try to products the bug on the page
  • Try by adding inputs that are out of bound & doesn’t suit that field. That will discover if any validation missed placing
  • Try out if keyboard return key works correctly while filling up form & also it scroll correctly & text area scrolls to top exactly over keyboard area while adding input

Test under lower internet connectivity :

  • Developers often do testing on simulators where the get the direct internet usage through ethernet connection & that’s why it loads data more faster
  • But using the same application on a device with limited speed is a slightly different scenario
  • Make sure all of the users wouldn’t have high-speed connections. So if application mostly depends on the server data then try to check how much loading time is & proper caching mechanism used in the application or not
  • To test that cache are enables or not you can try loading data again & again by killing the application in the background. You will notice that the time taken for loading the data is less in the second time then it took in the first time. That indicates that application using proper caching protocols.

Offline testing :

  • For the web server based application it requires necessary to do offline testing. Install first application & then drop the internet connectivity & see how the application behaves. Does it provides appropriate messages in case of no data availability or generates any crash issues?
  • Now do a similar process with a reinstall application load the web-based data for the first time & then turn off the internet connection & see if it loads offline stored data or cached data or it loads nothing.

Read More: Healthy iOS Development Tips & Tricks


Asynchronous data loading :

  • In iOS, it offers a feature for loading data asynchronous. That means it will not block the main thread & whatever data is loaded will appear & makes the application run smoothly.
  • This requires checking specifically where the data loaded from the web server & also the case where a large number of data loading it should not stuck whole application & wait until all data loads.


Memory level warnings :

  • This is the major point & requires to do hard testing of an application more preferably in a debugging mode.
  • For that, you will need to directly run an application to the device in a debugging mode
  • Once its installed try to do hard testing of an application by doing fast navigations to the pages & if any view contains scrolling with large data records than try to scroll up & down continuously for at least 60 seconds. If the application will have proper memory releasing techniques used then it will not get crashed
  • Otherwise, it will start giving memory level 0-1 warnings in just a few seconds of scrolling. That indicates or application CPU usage time & memory usage is very high & application can exit at any stage


Always prefer device testing :

  • Its more preferred that you do testing on every available device on which your application is compatible with.
  • Well, it’s not possible though to test on all devices but do at least test on the device you have available.
  • The reason why is few of the issues which not detects on the simulators but it can products a crash on a device.
  • Like if you have an image used in the application wrongly named or capitalized it will work fine on simulators but it will create an issue on a device. There are lots more such points that can only be tested on the device.


Test application on 64-bit devices :

  • It’s important to check if your application supports arm 64 supported devices or not. Now as per apple new rules all application is 64 bit compatible only will be allowed to upload to the store otherwise it will give error message while uploading on the store
  • But there are few applications still on the store which is never updated after its deployed on the store. So that not contains a 64-bit support


Conclusion :

Bugs & glitches free application easily get acceptance on the app store & it also increases the application engagement.

As every user when downloads the application they expect to application works at least without any bugs. So if a user gets it they will also appreciate it & more usage of the application by them will improve the over all ranking of the application.

This can only be achieved by the coordination between developers & testers.

10 essential WordPress plugins for food bloggers

10 essential WordPress plugins for food bloggers

Many people have started blogging nowadays and the main problem that occurs is they don’t know the use of plugins and how to save their content from being used by different site. WordPress has numerous plugins that can help blogger improve, market and save their content from thieves. They just need to know the right use and which plugins to use.


Tags: Build your own Website, food blog plugins, Indian food recipes, recipe, Tips and tricks, WordPress, wordpress plugin for food blog, WordPress plugins, WordPress Website Development
Free online mockup sites to generate eyecatchy screenshots for mobile apps

Free online mockup sites to generate eyecatchy screenshots for mobile apps

Users or clients need to understand how your proposed app will work. To solve this purpose, your must showcasing your app with impressive app screenshots. Well, here you need to hire design professionals, right! Designers always have to spend hours on making perfect screenshots for multiple devices.

Mockup templates is a one-step solution that will save designers time and indirectly  the making cost of your mobile app. Use mockup templates for showing off your app designs or screenshots, no photoshop needed. Here in this post i am going to share the hand-picked list of free online mockup sites. Check out high quality PSD templates on these mockup sites that help you getting attractive app screenshots easily for free with no hassle.


Tags: App screenshot mockup, App store screenshot mockup, Free app mockup tools, Free mockup sites 2016, Free mockups online, Free PSD mockups, iPhone mockups, Mobile app mockup, Mockup screenshot generator, pressroom
How to install wamp server on windows

How to install wamp server on windows

Why Wampserver is used?

Any website that uses server-side language such as Apache, PHP and MySQL requires a local server to run before make it live. Developer will need local server environment  to test changes rather than on web server.

Wampserver or WAMP is a local server package for Windows system. Its main purpose is to run test applications before being uploaded on to the web server.


Tags: Configure wamp server in windows, How to install wamp server, Installing wamp on windows 8, Installing wamp server, pressroom, Set up wamp localhost, Set up wamp on windows 10, Steps to install wamp server, Wamp server for windows, Wamp server installation guide, Wamp server installation in windows 7