Blog

Text Selection in UITextField

Selecting a part of an entered Text in a UITextField is not as easy as it seems. You need to do several steps to get to the goal.

The word entered in the textField is: PHILADELPHIA

itemAEntry1 is the textField in which the selection should take place.

int startpointIndex = 2; //the starting point Index is 2 (meaning the selection starts at the 3rd letter, remember the index starts with 0, first letter in the UITextField is 0)

Disable Tabbar Items

If you need to disable a specific UITabBarController Item, enter the following Code wherever you need it to be set.

int i = requiredTabBar; //First item on the left = 0

[[[[[self tabBarController] viewControllers] objectAtIndex:i] tabBarItem] setEnabled:false];

to re enable, just change …setEnabled:true];

Winter OPS: new App release

The release of the new application Winter OPS took a long time, one of the reasons was that we had to redo the layout of the application in the middle of the process as it was not user friendly. We figured that this is the main key to grant the users a perfect feeling for the application.

Now we will start updating the application with new and valuable features.


Vertical UILabel Alignment

How can you allign text to the top left in a UILabel? This question took me quite some time, well, as soon as I have searched the web, I found the solution quickly.

The basic solution is to create always a label that has the exact size of the text it contains. With this method, your text starts always at the beggining of your defined label position.


It is quite easy when you know how to do it:

The hype is over

It seems that all the new recruits interested in my military insignia application have bought it already. I'm registring only the usual downloads per day. This means that we'll have to wait another 3 months until the next training starts in spring. Hopefully these recruits will again use my application to study the ranks of the Swiss Army.

Commendation

My application Aviation DG was praised by a Swiss Dangerous Goods Inspector during an audit of my employer. They were thrilled about the easy handling and how quickly you receive valuable information.

Bring a subview to front

Interesting stuff can be done with bringing a subview to front, I didn't know this feature before and only ran across it tonight. I thought it was a bit tricky which view get's where.

[self.view bringSubviewToFront:tableInfo];

This brings the table in the current view in front of all other subviews.

Lost the fight

The app of my opponent is still better than mine, well so be it. It's just focused on the small market of Switzerland anyways. In addition, it's almost only targeting male users (as not many women serve in the Swiss Army) and basically only those currently in the service.

So I think I must be happy that the application is performing so well at the moment and I hope it will continue being like that in the future. …

Fighting for Place 1

Once again I am fighting for number 1 App in Swiss Education store, but another Military app is running a lot better, eventhough most people say mine is better. Time will tell, his app is 1 year older, so more distributed.

TintColor defaults??

I needed to programmatically tint a UISegmentedControl with a color if certain circumstances prevailed. But what if you need to revert to the default values (the ones when adding a UISegmentedControl in InterfaceBuilder)?

After a long search in the net, and lots of unsuccessful tries I found the easy solution:

[yourSegmentedControl setTintColor:nil]; //this changes the Segmented Control back to its default values (and colors)


© MR-Apps 2011-2013