-
Thursday, 5 April, 2012 - 12:09
Usually if you want to hide the keyboard, you click anywhere else on the view, the action that happens at this point is -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event or if you're using something along the lines of a UIScrollView, you'll need to set up a TapGesture. Once you'...
-
Tuesday, 14 February, 2012 - 11:46
To force your app to be landscape only:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
if(interfaceOrientation==UIInterfaceOrientationLandscapeLeft || interfaceOrientation==...
-
Thursday, 19 January, 2012 - 10:17
Following on from my earlier post I have now updated the code to reflect the changes in wp_nav_menu(), basically it is still the same, add this section into your functions.php:
function sethead($text,$list) {
$list = str_replace(' current_page_parent','',$list);
$list = explode("\n",$list);...
-
Wednesday, 18 January, 2012 - 23:38
One issue I have come across recently in Wordpress is when you're on a specific page, be it the author page, or a custom post-type, it's very hard to change the selected menu item in the header, it is always the main posts page (in my case, usually blog).
So after a while I built a system that...
-
Wednesday, 18 January, 2012 - 20:17
What are asynchronous Images, and why would I want to use it in my app?
You may be aware when coding in xcode for iPhone if you ever want to download a file for the user using [UIImage imageWithData:[NSData dataWithContentsOfURL:@"yoururl"]]; you will find that the application locks up while this...
-
Tuesday, 17 January, 2012 - 10:51
In Xcode you can use NSLog to display information from your app without it distrupting the actual UI of the app.
This works well but is limiting in a way, and someone on freenode today linked me to this post on stackoverflow.
Below you can see some code you would add into your .pch file:
#ifdef...
-
Sunday, 15 January, 2012 - 14:34
Recently I wanted to add rounded corners directly to an UIImage, I couldn't use a UIImageView, as this requires maskToBounds = YES; on, and as I had shadows in use, I couldn't set this.
So using the base work from ultie in the below code, I have added an extra function that was required (from...
-
Friday, 13 January, 2012 - 10:55
Recently I had the need to set my Macbook's wifi from terminal, hidden away in the private frameworks is this command:
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airportAfter running --help on it, you can easily tell what you need to set the airport on your...
-
Sunday, 1 January, 2012 - 12:39
Recently when working on an XCode project we had set the background colour to groupTableViewBackgroundColor, which on an iPhone produces a pinstriped background, and works well. This background is the same one as used on UITableViews.
When porting this to iPad, the UITableViews now have a solid...
-
Tuesday, 4 October, 2011 - 20:41
Equipment.
It's one of those words that sounds so easy to answer, but can cause so many problems, and in the long run makes you really think about what you carry around with you.
Camera: Nikon D5000
The easiest item to reply about is what camera you have. Now I'm sorry I've grown up using...