• Skip to main content
  • Skip to primary sidebar

Ravi Shankar

Tweaking Apps

  • About
  • Portfolio
  • Privacy Policy

Archives for June 2015

How to hide or unhide photos in iPhone or iPad

June 26, 2015 By Ravi Shankar Leave a Comment

iPhone and iPad users can temporarily hide photos from the albums. This is quite useful when you do not want other users to inadvertently view private photos from Albums. Listed below are the steps to hide and unhide photos from Albums in iPhone or iPad

Step 1: Navigate to Photos on your device.

Step 2: Navigate to Albums and select and long press the photos that you want to hide.

Step 3: Now select hide from the menu option.

And to unhide the photos, navigate to Albums and select Hidden. This shoud list you the hidden photos. Again long press the photo and select unhide option.

Filed Under: iPad, iPhone Tagged With: hide photos, unhide photos

Prevent installing or uninstalling apps on iPad or iPhone

June 25, 2015 By Ravi Shankar 1 Comment

Prevent

In this tutorial we will be see the steps required to prevent any users from installing or uninstalling any apps on iPad or iPhone. This is a useful tip if you are sharing your iPad with other people especially kids and do not want them accidentally uninstall and install any Apps.

To prevent users from removing or installing apps, press the menu button on your iPad and tap the Settings icon.

image

In the General Settings, tap the Restriction option and enable restrictions by setting a passcode. In the Restrictions screen, navigate to Installing Apps and Deleting Apps Option.

image

By tapping them and changing the value to Off would prevent users from removing or installing any apps on iPhone or iPad.

Filed Under: Apple, iPad Tagged With: apps, Install, iPad 2, prevent, Remove, Uninstall

Swift Demo – Add Progress Bar

June 24, 2015 By Ravi Shankar Leave a Comment

In this short tutorial, we will see the steps required to add UIProgressView to a Swift IOS Project.

UIProgressView and UILabel showing the current progress will be added programmatically to the View Controller. Create a Single View Application and navigate to ViewController.swift file.

Add UIProgressView and UILabel

Add the following code snippet below the class definition. This code snippet adds variables for UILabel and UIProgressView.

[code language=”swift”] var progressView: UIProgressView?
var progressLabel: UILabel?
[/code]

Now add the following function which initialises and adds UIProgressView and UILabel to the view.

[code language=”swift”]//MARK:- Controls
func addControls() {
// Create Progress View Control
progressView = UIProgressView(progressViewStyle: UIProgressViewStyle.Default)
progressView?.center = self.view.center
view.addSubview(progressView!)

// Add Label
progressLabel = UILabel()
let frame = CGRectMake(view.center.x – 25, view.center.y – 100, 100, 50)
progressLabel?.frame = frame
view.addSubview(progressLabel!)
}
[/code]

ProgressView style can be set to Default or Bar type. And UILabel needs to be appear just above the ProgressView hence we added an offset from view center.

Add GestureRecogonizers

This demo starts and resets the progress on single and double tap gesture event. The following code snippet adds single and double tap gesture recognisers to the view. This also specifies the function that needs to be called when user does a single or double tap.

[code language=”swift”]func addGestures() {
// Add Single Tap and Doube Tap Gestures
let tap = UITapGestureRecognizer(target: self, action: "handleTap:")
tap.numberOfTapsRequired = 1

let doubleTap = UITapGestureRecognizer(target: self, action: "handleDoubleTap:")
doubleTap.numberOfTapsRequired = 2

view.addGestureRecognizer(tap)
view.addGestureRecognizer(doubleTap)
tap.requireGestureRecognizerToFail(doubleTap)
}
[/code]

Now add the required functions for the gesture recogonizer events.

[code language=”swift”]// Start Progress View
func handleTap(sender: UITapGestureRecognizer) {
if sender.state == .Ended {
timer = NSTimer.scheduledTimerWithTimeInterval(1.0, target: self, selector: "updateProgress", userInfo: nil, repeats: true)
}
}
//MARK:- Double Tap
// Reset Progress View
func handleDoubleTap(sender: UITapGestureRecognizer) {
if sender.state == .Ended {
progressView?.progress = 0.0
progressLabel?.text = "0 %"
timer?.invalidate()
}
}[/code]

Display Progress

The actual progress will be displayed by the following piece of code in the updateProgress function. You can change progress interval by setting appropriate value to progress property of UIProgressView.

[code language=”swift”]//MARK:- Increment Progress
func updateProgress() {
progressView?.progress += 0.05
let progressValue = self.progressView?.progress
progressLabel?.text = "\(progressValue! * 100) %"
}[/code]

Finally we need to add the addControls and addGestures to the viewDidLoad method.

[code language=”swift”]override func viewDidLoad() {
super.viewDidLoad()
addControls()
addGestures()
}[/code]

Download source code from here (SwiftDemo – ProgressView)

Filed Under: Xcode Tagged With: Gestures, UIProgressView

Change default file location in PowerPoint 2013 and 2010

June 22, 2015 By Ravi Shankar Leave a Comment

In PowerPoint 2013 and PowerPoint 2010 the default file location set as C:\Users\<username>\Documents\ in a Windows Vista or Windows 7 Operating System. This is the location that will be shown and used as the default location when a user tries to save a presentation file.

PowerPoint Save As

PowerPoint provides users with option for changing this default file location to some other folder of your choice. Listed below are the steps to change the default file location in PowerPoint 2010,

Step 1: Click the File menu then the options link.

Step 2: In PowerPoint options window, navigate to Save options and then to the Save presentations section.

PowerPoint Options

Step 3: In Save presentation section, set the folder of your choice for Default file location. For example if you set it to C:\Projects then the Save or Save As option would now default to the newly set folder location as shown below.

Change Default File Location PowerPoint

Filed Under: Office 2010, PowerPoint 2010 Tagged With: Change Location, default file location, Powerpoint 2010, Save Presentations, Windows

Create new Test Target in Xcode

June 22, 2015 By Ravi Shankar Leave a Comment

Listed below are the steps to add test target for an existing iOS Projects (iOS 6.0 and older).

Click File menu -> New and Select Target from the menu list.

Then select Cocoa Touch Testing Bundle under iOS -> Other template section.

Enter product name for the new target and other details and click FInish.

Now you should be able to see the newly added test target under Project Navigator and Test Navigator.

Filed Under: Xcode Tagged With: iOS Projects, Test Driven Development, Test Target

Automatically answer calls in iPhone Speaker

June 18, 2015 By Ravi Shankar Leave a Comment

iPhone users have the option to automatically take the calls in Speaker. Listed below are the steps to enable iPhone to receive phone calls in Speaker.

Step 1: Tap the Settings icon on the Home screen.

Step 2: Navigate to General option in Settings screen.

Step 3: Select Accessibility option in General Settings screen.

Step 4: Scroll down the Accessibility screen and pick Call Audio Routing option.

Step 5: Scroll down the Accessibility screen and pick Call Audio Routing option.

Now you should be automatically pick the in iPhone Speaker mode.

When most of the times you are busy with work and would like to answer calls in Speaker phone then this would be a quite useful option.

Filed Under: iPhone Tagged With: Speaker

DatePicker Demo in Swift

June 17, 2015 By Ravi Shankar 6 Comments

In this short tutorial, we are going to see the steps required use DatePicker in a iOS / Swift project. This demo is done by adding the DatePicker controls to Interface Builder and not programmatically.

Date Picker Mode

Date Picker control allow developers to specify the mode such as Date, Time, Date and Time and Count Down Timer. Listed below are the screenshots of each Date Picker mode.

Date Picker (Mode – Time)

Date Picker Mode set to time

Date Picker (Mode – Date)

Date Picker Mode set to Date

Date Picker (Mode – Date and Time)

Date and Time mode set for Date Picker

Using the Date and Time mode does not provide option to pick year. Hence in this demo we are going to use two date picker controls, one for date and another for time.

Add ViewContoller and Controls

Add a View Controller (or use existing ViewController) to storyboard then drag and drop 2 date picker controls to the View Controller. Also add a UILabel for displaying the selected date and time values. For the first Date Picker set the mode to Date and for the second as Time.

Add DatePickerController class

Now add a new file to the project and choose the template as Cocoa Touch class. Provde the name for your class file as DatePickerController. Add the following lines of code that adds IBOutlets to the ViewController

[code language=”swift”]@IBOutlet var datePicker:UIDatePicker!
@IBOutlet var timePicker:UIDatePicker!
@IBOutlet var dateTimeDisplay:UILabel![/code]

Select the ViewController in the Storyboard and set the class in the Identity Inspector to DatePickerController. Now click Show Assistant Editor then Control + drag and drop date picker to class file. Select connect as Action and provide the name for the function as datePickerChanged.

Now you should see the following function added to your class file.

[code language=”swift”]
@IBAction func datePickerChanged(sender: AnyObject) {
}[/code]

Repeat this exercise for the TimePicker (second date picker control) with function name as timePickerChanged.

[code language=”swift”]@IBAction func timePickerChanged(sender: AnyObject) {
}[/code]

Also make sure to connect all the IBOutlets from the class file to the corresponding controls in View Controller.

Set Date and Time

Add the following piece of Date Formatter code just below the IBOutlets definition. We are using two instance of NSDateFormatter to specify the date and time style for each date picker controls.

[code language=”swift”]let dateFormatter = NSDateFormatter()
let timeFormatter = NSDateFormatter()[/code]

Add the following function that formats the date and time and assigns the value to UILabel.

[code language=”swift”]//MARK:- Date and time
func setDateAndTime() {
dateFormatter.dateStyle = NSDateFormatterStyle.ShortStyle
timeFormatter.timeStyle = NSDateFormatterStyle.ShortStyle
dateTimeDisplay.text = dateFormatter.stringFromDate(datePicker.date) + ” ” + timeFormatter.stringFromDate(timePicker.date)
}[/code]

Add the function call to the date picker’s Value Changed methods.

[code language=”swift”]@IBAction func datePickerChanged(sender: AnyObject) {
setDateAndTime()
}
@IBAction func timePickerChanged(sender: AnyObject) {
setDateAndTime()
}[/code]

Download the source code from here (SwiftDemo -> DatePicker)

Filed Under: Programming, Xcode Tagged With: DatePicker, Swift

How to turn on the automatic spell check in Word

June 16, 2015 By Ravi Shankar

In general Microsoft Office products provides options for  automatic spell checkand you can find this feature in Word 2007, Word 2010, Word 2013 and Word 2016. This feature can be turned on or off using Microsoft Word options.

Click on the File menu –> Options (In Word 2007 it is under Office button –> Word Options)

Select Proofing options and navigate to When correcting spelling and grammar in Word section. This has a checkbox with label as  Check spelling as you type. By checking this field, you can turn on the automatic spell check as you type in Word 2010.

Updated with readers comment, this seems to have solved the problem for most of the users- Thank You Maria. Find below the screen shot for the same

Spelling and grammar check in Word 2016, Word 2013 and Word 2010

The Review menu in Word 2013 has the option to check for spelling and grammar errors. Let us say you want to run through a document for spelling and grammatical errors then you can navigate to Review menu and click the Spelling and Grammar option under Proofing section.

If there any errors in the document then you should see a sidebar showing the error staring from the current page.

This should provide you with an option to Ignore or Change the error as shown in the above screenshot along with the suggestion.  Once you choose either Ignore or Change, the next error will be display and this process would continue till there are no more errors left in the document.

In case you want to change the language used for Spell Check to English (United Kingdom) then you can use the language box available at the bottom of Spelling and Grammar sidebar.

If there no more errors left in the document then you should notice the following Spelling and grammar complete message.

How to hide spelling and grammar errors in Word 

Word users can hide spelling and grammar errors clicking File menu –> Options link. (In Word 2007 it is under Office button –> Word Options)

Navigate to  Proofing Options and scroll down Exception for section. Under this section there are check box available to  hide spelling errors and grammar errors.

Disable highlighting spelling and grammatical errors

If your word document does not highlight the spelling and grammatical errorsthen probably you can check the settings mentioned below.

Let us say you have the following sentence with spelling and grammar errors and currently these errors are not highlighted.

Select the sentence and click the Review menu and navigate to Language section.

Select Set Proofing Language drop down value from the Language menu option.

 

This would display the following Language window. Un tick the check box with label as Do not check spelling or grammar and click Ok button to confirm and save the changes.

 

This would start highlighting the spelling and grammar errors in the sentence.

 

If this did not solve the problem then probably you check by enabling auto spell check feature

Filed Under: Auto Spell, Automatic, Hide spelling and grammar erros, Highlight errors, MS Office, Spell Check, Word 2007, Word 2013, Word 2016

  • Go to page 1
  • Go to page 2
  • Go to Next Page »

Primary Sidebar

Recent Posts

  • We have blocked all requests from this device – Firebase Phone Authentication
  • iPhone is not available error message in Xcode
  • Clear CocoaPods cache, re-download and reinstall all pods
  • PDFKit – View, Annotate PDF file in Swift
  • Tab Bar Controller with WebView

Archives

  • September 2020
  • April 2020
  • December 2019
  • November 2019
  • October 2019
  • February 2019
  • October 2017
  • June 2017
  • May 2017
  • March 2017
  • September 2016
  • March 2016
  • February 2016
  • January 2016
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • April 2015
  • March 2015
  • February 2015
  • January 2015
  • December 2014
  • November 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • April 2014
  • March 2014
  • February 2014
  • January 2014
  • December 2013
  • October 2013
  • August 2013
  • July 2013
  • June 2013
  • April 2013
  • March 2013
  • February 2013
  • January 2013
  • November 2012
  • August 2012
  • July 2012
  • June 2012
  • May 2012
  • March 2012
  • February 2012
  • January 2012
  • December 2011
  • October 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • April 2011
  • March 2011
  • January 2011
  • September 2010
  • August 2010
  • July 2010
  • June 2010
  • July 2009
  • March 2008

Copyright 2020 © rshankar.com