Noorse Lijster 19

Living in the Dutch mountains

Flower

Posts Tagged ‘iPhone’

Using ShareKit For Twitter Sharing Only

Example iOS project for iOS using both ShareKit to share a tweet from your application preceeded by a fixed hashtag. The example is using xAuth authentication which requires approval from Twitter.

Steps to create the project:

  1. Download the lastest version of ShareKit
  2. Create a project based on the Windows template
  3. Add the ShareKit folder to your project
  4. Add the ShareKit button to the navigation bar and add the code to UIViewController for ShareKit (See example code)
  5. Modify the Twitter section of the SHKConfig.h file. Depending on using oAuth or xAuth you need to make different changes
  6. Modify the application section of the SHKConfig.h file. I did configure #define SHKMyAppName @”Verkeersles” and #define SHKMyAppURL @”http://www.noorselijster19.com”, you should use your own settings
  7. To see the standard behaviour build and run the project
  8. Modify the SHKActionSheet.m file to remove the standard MORE button from the UIActionSheet and the related behaviour
  9. Modify the SHK.m file to change the accepted types of sharing for text (SHKShareTypeText) e.g. only allow Twitter sharing
  10. I did remove the Tumblr mail option from the SHKSharers.plist

Now build and run the project

Download the example for TwitterWithHashTags here…

Localize Using User Defined Language

Example iOS project displaying text in English (default) or Dutch depending on the user defined language settings.

The first time the application will use the English language. The user can switch between English and Dutch using the segmented control. The selected language is persisted in NSUserDefaults and used the next time to initialize the language after loading the application.

The example uses the localized information stored in localized strings file. The localized information is retrieved using NSLocalizedString method.

Download the example for UserDefinedLocalization here…

Localized FAQ with Search capability

Example iOS project displaying FAQ in English (default) or Dutch depending on the iPhone international settings.

The example uses both the localized information stored in Core Data. The attribute names are also localized to retrieve the information using NSLocalizedString method.

After initial startup “Press +” to populate the database.

The application lists the FAQ categories and the detailed overview shows the FAQ for a specific category. Each FAQ contains a question presented in the Section Header and the answer is presented in the first Section Row. The question can be selected by touching the Section Header, the related Section Row expands and the Section Row for the previous selected questions will collapse.

The application offers the possibility to search for FAQ matching particular strings. When the searchbar is clicked the keyboard appears and the cancel button is added.

The cancel button clears the searchbar and initializes the results. Clicking the search button queries the Core Data database using the seachbar text as predicate.

Download the example for LocalizedFAQ here…

Localized Plist

Small example iOS project displaying the country name in English (default) or Dutch depending on the iPhone international settings.

The example uses both the localized strings file and the localized plist.

Download the example for LocalizedPlist here…