HOME - WEBDESIGN / IPHONE APP - ALL IN VAIN - PICTURES - FORUM - DEVELOPEMENT - MYSPACE - TWITTER - YOUTUBE - CATEGORIES - Login/Registration - RSS

Countdown bis zum Greenfield 2011:


how to dismiss keyboard in uitextview


in Allgemeines,Anleitung,Development,How-To,iPhone,Tutorial @ 16:02 am 15. März 2011
Comments: 0

In my iPhone application I had a UITextView and I wanted to allow the user to insert text and submit it. The problem was that the keyboard didn’t disappear when you clicked on return or done. I searched quite a bit and found this working solution:

In your controller .h file:

@interface YourController : UIViewController  {
IBOutlet UITextView *textView;
}

In your controller.m file:

- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text {
NSLog(@"called");
if([text isEqualToString:@"\n"]) {
[textView resignFirstResponder];
return NO;
}
return YES;
}

This function gets called every time you insert a character. If you click on Return/Finish/Whatever, the keyboard will be dismissed.
If it doesnt work, open Interface Builder and map your UITextView with the Files owner and assign delegate. Put your comments into the comment section.


An Twitter senden, Geposted von Pädde


apple wireless keyboard unboxing and installing


One week ago I bought the Apple Cinema Display 27 Inch and I used my old cabled keyboard from Apple. This keyboard was like 2 years old and the “T” key didn’t work properly :) So I decided to go to the next Apple Store to buy the wireless keyboard.


(weiterlesen…)

An Twitter senden, Geposted von Pädde


sqlite3 umlauts/special character problem


When you are developing an iPhone application, you will most likely have to use an internal database to store your data. I also needed a database for my Facts iPhone application. As the app contains german words, it also contains umlauts and special characters like äöü and all this stuff that is not present in the english language. However, I was not able to support these special characters although I used UTF8 encryption in my application.

To create the database, I used the following commands in terminal:

cd Desktop
mkdir FactsDatabase
cd FactsDatabase
sqlite3 facts.sqlite

Now you will see the sqlite command prompt which only accepts sql commands from now on. This is where I have created my database, and inserted some facts:

// create table
create table facts(id integer primary key, fact text, isFavorite varchar(5), alreadyRead varchar(5));

// fill database with facts
sqlite3 facts.sqlite “INSERT INTO facts(fact, isFavorite, alreadyRead) values(‘Täglich werden 12 Neugeborene den falschen Eltern gegeben.’, ‘no’,'no’);”

Now if you do it like this, the special characters won’t show up in your application. After some hours of trying I tried to use run my sqlite commands in a shell script. I had to rearrange the commands to fit like this:

# drop exising table
sqlite3 facts.sqlite “drop table facts;”

# create database
sqlite3 facts.sqlite “create table facts(id integer primary key, fact text, isFavorite varchar(5), alreadyRead varchar(5));”

# fill database with facts
sqlite3 facts.sqlite “INSERT INTO facts(fact, isFavorite, alreadyRead) values(‘Täglich werden 12 Neugeborene den falschen Eltern gegeben.’, ‘no’,'no’);”

Save it as database.sh and in terminal, give it the rights to execute: chmod+x database.sh, and then run it with ./database.sh
If you do it like this, the special characters are finally in the database and will show up in your application. To be honest, I have no idea why it only works with this workaround. It costed me quite a bit of time. Anyway, hope that helps anyone. If you have questions, use the comment section. Cheers.


An Twitter senden, Geposted von Pädde


Xcode Debugger has exited with error code 45


in Anleitung,Computer,Cydia,Development,iPhone,Macbook Pro,XCode @ 16:16 am 14. Februar 2011
Comments: 0

I jailbroke my iPhone some days ago with the GreenPois0n Tool and installed all my stuff. When I was using my iPhone for Developing I found out that the debugger always exited with error status code 45. First I thought it was a problem with my app but then I tried with a non-jailbroken iPhone 3GS and it worked without errors. I debugged the output code and found out that the “PhotoAlbums+” application which gives you the ability to create photo folders crashed all the time. I uninstalled this app from Cydia and now I can continue with development. Just as information if someone has the same problem :)


An Twitter senden, Geposted von Pädde


PunkBuster problem with Battlefield Bad Company 2


in Allgemeines,Anleitung,Computer @ 19:47 am 10. März 2010
Comments: 0

I was never able to play some EA games online because punkbuster always kicked me out. PunkBuster.exe is a small application which kicks players out of the server, if the game was modified. This prevents cheating. But I didn’t modifiy my game and I always got this message: “PunkBuster INIT Failure” – ord “Connection to server lost”. I found a way to fix this:

- First of all, download the latest punkbuster from here

- Make sure that you open the game with administrator privilegues

- Make sure your firewall or antivir doesn’t block the punkbuster service (PnkBstrA (B) whatever)

- Start – Run – Services.msc

- Make sure the process is running. If it is not running you will be kicked out of the server with the message: Punkbuster Init Failure.

- Make sure that your account does have a password (local computer account). This is needed for the next step.

- Right click the service – Preferences – Login – Click on this account instead of local account.

Please note that this screen is made on a german computer. After this you should be able to play your favorite games online again. You have to do this everytime you turned your computer off :(

An Twitter senden, Geposted von Pädde


wie man ein iphone icon für die eigene website macht…


Ich habe soeben herausgefunden, was man machen muss, damit das iPhone oder der iPod Touch das kleine Icon erkennt, wenn man ein Bookmark auf dem Homescreen macht.

Designt ein eigenes Icon, welches die Masse 45 x 45 Pixel hat, und nennt es apple-touch-icon.png! Anschliessend ladet ihr dies auf in das Root Verzeichnis eurer Website herauf. Fertig:

apple-touch-icon

Dies ist mein Icon, welches auf den Homescreen soll.

Für Screenshots bitte hier weiter lesen: (weiterlesen…)

An Twitter senden, Geposted von Pädde


endlich, mein neues autoradio!


in Allgemeines,Anleitung,Basteln,Musik @ 20:06 am 6. Oktober 2008
Comments: 4

Was nützt dir ein Autoradio, welches nur CDs wiedergeben kann? Oder ein Autoradio welches nicht mal Radiosender anzeigt, und schon gar nicht über RDS verfügt. In einer Zeit von iPods, iPhones und MP3 Playern wärs doch noch angenehm, wenn man sein iPhone einfach ans Autoradio hängen könnte.

Genau das habe ich mir auch gedacht, und entschieden: “Ein neues Autoradio muss her”. Heute hab ich nun endlich Bescheid bekommen, dass mein Autoradio abholbereit ist. Ich nahm also die 40 Minuten Autoweg (schon etwa zum 6 mal diese Woche) nach Emmenbrücke in Angriff. Ich hatte glück, den heute war dort alles 10% billiger. Somit hab ich den Adapter sozusagen noch umsonst gekommen.

Zuhause angekommen, hab ich sofort alles ausgepackt und begonnen, das Teil aus und dan einzubauen.

So sah das alte Autoradio aus. Wie ihr seht, 0815 snif

(weiterlesen…)

An Twitter senden, Geposted von Pädde


aus schrott mach pc!!!


Mir ist schon manchmal aufgefallen, dass bei uns extrem viel “schrott” PC Teile herumliegen. Da ich jetzt ein paar Tage Ferien habe, hab ich mich entschlossen, aus diesem Schrott einen PC zusammenzustellen für meine MUM. Immer gamen am Computer des Bruders kanns ja auch nicht sein xD

Gut, so sah er am Anfang aus:

Das war einmal ein alter Dell. Inzwischen muss ich sagen, ich hasse DELL! Keine Elektronischen Platten sind nur irgendwie beschrieben. Keine Schaltschemen und schon gar keine Gebrauchsanleitung. Deshalb hatte ich den mal ausgemistet.

(weiterlesen…)

An Twitter senden, Geposted von Pädde