You may be programming a Universal App for iPhone, iPad, or iPad Pro and wondering how to write conditional code for those variant iOS device sizes.
So here is how to write code by identifying the device height of your display or frame.
Here is how to solve this situation by identifying device height,
Note: This code uses the native bounds of the device, so it will work for all current devices that may be in landscape or portrait mode. Code is written in Swift Programming Language.
Here is the situation in your Xcode project where you want to call a method from another class Swift file to your original class of Swift file.
Let’s call your original swift class file ‘FirstViewController’, which has ‘UIViewController’ as a superclass.
The second swift that you want to call a function from, we will assume that it has ‘SecondViewController’ as the class name & it has ‘UIViewController’ as a superclass.
You have written a function called ‘print something()’ in your ‘SecondViewController’ that would be triggered when somebody taps on the button present on ‘FirstViewController’ as IBAction called ‘print this(sender: UIButton)’
Disk Utility is a system utility for performing disk and disk volume-related tasks on the macOS.
Day-to-day functions supported by Disk Utility are:
Creation, conversion, backup, compression and encryption of logical volume images from a wide range of formats read by Disk Utility to .dmg or, for CD/DVD images, .cdr
Mounting, unmounting and ejecting external disk volumes
Enabling or disabling journaling
Verifying a disk’s integrity and repairing it if the disk is damaged
Erasing, formatting, partitioning and cloning disks
Secure deletion of free space or disk using a “zero out” data, a 7-pass DOD 5220-22 M standard, or a 35-pass Gutmann algorithm
Adding or changing partition table between Apple Partition Table, GUID Partition Table and master boot record (MBR)
Restoring volumes from Apple Software Restore (ASR) images
Checking the S.M.A.R.T. status of a hard disk
Disk Utility functions may also be accessed from the OS X command line with the diskutil and hdiutil commands.
Now, we will learn how to partition disks,
Important Note:
Partitioning a disk erases all the data previously stored on it
The disk utility’s partition feature divides the disk into partition sections, which appear on the desktop as separate disks.
Precaution: Before proceeding, backup all your computer data using Time Machine on a hard drive other than the one you are currently partitioning.
Here is how to Partition a disk
Step 01: Connect the External Disk to your Mac using a USB / FireWire cable to partition it
Step 02: Locate ‘Disk Utility App in Applications > Utilities
Here is how to transfer backups from a current backup drive to a new high-capacity backup drive
Step 01: First, check the format of your new backup drive
Connect your new backup drive to your Mac.
Open Disk Utility (located in the Utilities folder).
In Disk Utility, select the new drive’s icon to ensure it has a GUID partition and is formatted as Mac OS Extended (Journaled). Reformat it with the Mac OSX Extended (Journaled) option with a GUID partition. At this stage, you can format your new backup drive with Mac OSX Extended (Journaled, Encrypted) to password-protect it and thus safeguard your data. Remember to write down the encryption password you set for your drive this time.
Step 02: Set permissions on your new backup drive
Open a new Finder window. In the sidebar, click the icon of the latest backup drive.
Choose Get Info from the File menu.
Make sure “Ignore ownership on this volume” is deselected (unchecked) at the bottom of the “Sharing & Permissions” section of the Get Info window.
What do trust settings mean to your iOS & macOS device
When you connect your iPhone, iPad, or iPod touch to a computer for the first time, an alert asks whether you want to trust this computer or not.
Relationships of Trusted Devices:
Trusted computers can sync with your iOS device, create backups, and access your device’s photos, videos, contacts, and other content.
These computers remain trusted until you change device privacy settings or erase your iOS device.
If you choose not to trust a computer, you block its access to content on your device. You’ll see the trust alert whenever you connect your iOS device to that computer.
If you are like mine, use safe macOS default settings to allow the system to run & open apps only from third-party Identified App Developers.
You may face a problem with something like this. Your Mac’s Security & Privacy preferences will not allow you to open the app from an unidentified macOS App Developer.
If you navigate to System Preferences > Security & Privacy > General tab, you will see something like this:
So, how will you open that particular app blocked by the Security & Privacy Settings?
Solution 01: You can change the settings available in System Preferences > Security & Privacy > General tab under Allow apps downloaded to Anywhere
Important Note: This solution may not be the safest for the health of your operating system security & privacy settings.
I have been using WordPress for almost more than five years now.
In the post below, I will explain the step-by-step procedure for hardening, securing, and optimising WordPress for best performance and security.
So, First things first,
Introduction to WordPress
What is WordPress? WordPress is a free and open-source content management system (CMS) based on PHP and MySQL. Its features include a plugin architecture and a template system. As of January 2015, over 23.3% of the top 10 million websites used WordPress. WordPress is also the most popular blogging system on the Web, with more than 60 million websites using it.
As we know today, WordPress is offered in two different formats: one is managed and hosted by the team at WordPress.com, and the other is self-hosted by the user using a downloadable installable package available at WordPress.org.
Difference between WordPress.com & WordPress.org
The following things differentiate WordPress.com and WordPress.org from each other
1st Difference WordPress.com: The user provides the content & website is managed by the team at WordPress.com. WordPress.org: Content provided by the User & Managed by the user itself.
To enable browser caching, you need to set expiry dates on certain files. Find your .htaccess file in the root of your domain. You can edit the .htaccess file with Notepad or any text editor. In this file, we will set our caching parameters to tell the browser what types of files to cache over a period of time so that page loading time improves by avoiding or keeping certain files and using browser cache from history.
As we know, the WordPress community exist on wordpress.com & wordpress.org
WordPress.org is a downloadable CMS (Content Management System) distribution for self-hosting used by web designers and developers.
Being a CMS lead developer, Automattic wants its wordpress.com experience to be available to its wordpress.org users. So, they developed plugins like JetPack for WordPress self-hosted websites.
JetPack Error: Your website needs to be publicly accessible to use Jetpack: site_inaccessible Error Details: The Jetpack server could not communicate with your site [HTTP 404]. Ask your web host if they allow connections from WordPress.com. If you need further assistance, contact Jetpack Support: http://jetpack.me/support/
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional
Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.