Skip to main content

DownPicker: A lightweight DropDownList / ComboBox for iOS written in Objective-C

Quick links: Project Page – GitHub – Pod

Eventually, while developing in iOS, you’re going to find yourself looking for a control allowing the user to pick an option from a drop-down, selectable list of items: any UI has something like that: drop down lists, combo boxes, expand & collapse views or anything that could resemble the behaviour of an HTML <select>  element.

Problem is, iOS doesn’t feature anything like that. Except for the UIPickerView control, which often isn’t what we really need because of its excessive height and its heavy-impact look, which isn’t always as pretty as Apple designers thought it would be, at least in real-case scenarios. Conversely, we often need it to be simpler, taking less space and/or decently blending with other TextField elements.

 

UIPickerView in action: not always pretty.
UIPickerView in action: not always pretty.

With that thought in mind I pulled out DownPicker, an iOS control who can mimic the behaviour of a DropDownList/ComboBox using default iOS UI elements only: an UITextField to prompt the user to tap (and then show the selected item) and an UIPickerView to handle the selecting.

Read More

Unwanted Ads & AdSense Malvertising: how to shut them down

One of the AdSense publishers worst nightmares is the constant appearance of advertisers abuses and their visually unacceptable – and mostly fraudulent – ad-like contents. That awful practice comes with the name of Malvertising, which effectively describes the techniques used in order to fetch your visitor’s clicks: hoaxes, scams, preposterous disease remedies and so on.

The latest pile of rubbish we’re dealing with during these days is GiornaleGiornaliero.com, a misinformation website proudly hosted by Active Food Supplements Limited Ltd. (Broward, Florida) which features an astonishing series of fake articles, journal entries and reviews – mostly in italian, thanks to the first autotranslate they could probably get – praising sex-enhancement pills, fat-loss recipes, colon-cleansing berries and so on.

We won’t indulge further over this nonsense: it’s not worth it. Let’s see how we can cleanse our web sites – and shield our visitors – from increasing these parasites e-wallets.

Read More

Favicon: why and how to add it on your WordPress-enabled Web Site

Favicon stands for Favorite Icon: we’re talking about the 16×16 px icon that identifies your website during the user navigation. Most browser shows it on the left side of the address bar, assuming the currently visited website has one. It’s also shown in the active navigation tab and in all of the browser’s favorites listings, menus and bars.

example-favicon

Why you should use it

It’s not merely aesthetics: favicon enables the user to identify the website he’s currently visiting, mentally group its pages/tabs in his browser window or inside his favorite list. A favicon-enabled website hooks up its users and simplifies their navigation, while also having a more professional look. That’s why, no matter what results you want to achieve on the web,  you definitely want to have this kind of website.

Read More

Add a multi-language slideshow to your WordPress Home Page using Meta Slider plugin

One of the most frequent questions featured by the wordpress.org official support forum is about adding a slideshow-type image gallery to a WordPress-powered home page, possibly also localizing its contents for multiple languages. This brief tutorial shows how to do that using the well-known Meta Slider plugin, one of the most used slideshow generators, yet you can achieve the exact same results with any slideshow plugin supporting shortcodes (never heard about them? read here).

Read More

Objective-C: Programmatically set UIView alignment without using Storyboard

I recently wrote an article about removing Storyboards constraints programmatically. When you do that, you’ll often also want to replace the removed constraints with new ones: you can do that – programmatically as well – by using the addConstraint method, which allows to set one or more constraints between any two UIView items.

Let’s see some example by taking a standard UIButton item as the first object and its Parent View (or superview, as it is called by Objective-C) as the second one.

Read More

Close