Author / Giovambattista Fazioli

Let’s see some useful method about NSURL Return the name of a file (with or without extension) from NSURLRequest: Return the file extension from NSURLRequest: Finally, How to convert an address from NSString to NSURL and vice versa:

Read More

You can include a page/post content into a different page/post. For example, if you have a privacy disclaimer may be useful to load that content in a different context. This could be very useful when: Anyone can edit the page/post without edit the included content The loaded content works as standalone page/post as well The […]

Read More

You love Chroma Key, don’t you? As you know, this method is used to replace a background color with what you want. Today this technique is used everywhere also where you don’t expect. Have a look the video below.

Read More

Many developers use the HTML comment in order to analyse the page by using the “view source” feature provided by almost all browsers. However, these comments will be visible to everyone. Also, they are sent from the server to the client and that could take a lot of needless bytes. If you don’t need to […]

Read More

Currently, Objective-C does not support a class that provides a simple way to generate a random number. Anyway, we can use some C functions like: rand(), srand(), random(), srandom() e arc4random().

Read More

If you have used a custom query ( for example with query_posts()) before standard WordPress flow, you might reset the internal query to avoid the strange result in the sidebar or other sides:

Read More

NSTimer is used is several contexts. However, you have to careful when you are going to invalidate the variable. For example: Usually, you will use: As you can see in the code above, the timer is switched off but the variable is unset, so it is dangerous. The best way could be: or, in a […]

Read More

In WordPress, you can organise the category with a relationship parent/child. This means that a single post belongs to multiple categories. Let’s see how to get the parent category of a post:

Read More