Showing posts with label ios-tricks. Show all posts
Showing posts with label ios-tricks. Show all posts

Thursday, 13 December 2012

How to Override Silent switch while playing sounds in an iPhone/iPad app using AVPlayer

As you guys know there are 2 ways to play sound files from the within app like game sounds, warning/caution sounds or alarm sounds.

One is by using Audio Services in AudioToolBox frame work.
And the other is by using AVPlayer in AVFoundation frame work.

You can follow How to play sounds in an iPhone/iPad app tutorial to learn how to play sounds in an iOS app.

The trick to override the switch is possible only by using AVPlayer, and here is how we can accomplish that.
Just use the below line, must be used in viewDidLoad or some where before using AVPlayer classes.

[[AVAudioSession sharedInstance]
setCategory: AVAudioSessionCategoryPlayback
error: nil];

Links Section

Hello developers, 

In the journey so far even i stuck up at some moments from days to weeks. Later on searching several forums and tutorials got solution to get through the difficulties easily. So in this section i will share the links of the blogs, forum's Q&A, tutorials which really helped me really a lot to fix my issues or get it done. 
And also some interesting links which i found.

HTMLParsing, as the name says i got a task to parse html content with in xml response to extract the content within. After some few search straight forward i got a tutorial which explained the steps beautifully, you all know the source of the tutorial, yes you are right its from Raywenderlich.                    

Orientations in iOS 6, as you all know apple changed its apis relate to orientations. I tried many options with the available new api's but none of them lead to success, finally got this tutorial from Shabbir's Forum, then everything worked like charm.

 GeoNames, The geographical database covers all countries and contains over eight million place names that are available for download free of charge. This provides the data in many formats so for newbie it will great site to learn parsing data from server, and more over it also has data in other formats too. Have a look at the GeoNamesWebServices Overview.

Creating Static Libraries For iOS, you might have seen some libraries in xcode such as "libxml2.2", and many more. These are static libraries, this tutorial helps you to create your own static libraries.

Simple XML to NSDictionary Converter, as the name indicates its a simple XML to dictionary converter.

Generate PDF programmatically in iPhone/iPad SDK, generating your own pdf through code.

Saving Layers, slice the images from any Photoshop file. Extract layers as png files and implement in your app.

CoreData Basics Part 7 – Search Bars, many of you have wondered how search display controller is help ful, this tutorial is about that. Apart from that it integrates with the your core data too using fetch controller.

 Icons Pedia, a free site to get png files artworks for your app. And also you can create the app using these free artworks as a prototype app and later you can show it to your designer to create the artworks for your own.

 ZooZ- In-App Payments, apple has its own in-app purchase, which does the payments from the users app store accounts as it is linked with users Credit Card info. Apple says the app must use apple's in-app purchase if it deals with digital content. If you are selling a physical goods, you may opt user directly pays you through his Debit/Credit card, Zooz is one such payment gate way enables the user to pay through Debit/Credit card from your app. It also has an option to pay through PayPal.

 Upload your App - Diawi - Development iOS Apps Wireless Installation, this enables to download the app directly to your device through device's browser. You can upload the build to this site and send the link to your client so that he can download the app directly to his device and start testing.

Base64Online - base64 decode and encode, encoding & decoding any image in base64 format, which is a string of characters. You can send this data to your server from device to upload image files. This link provides to encode & decode images into base64 formats online.


Happy Coding,
Vishy

Friday, 30 November 2012

Beginner's Choice

My dear developers,

Am Vishwanath, started my career directly from learning Objective-C building iOS applications. Before this i was just aware of C and C++ languages only. Now i have over 2.8 years on Obj-C and 2.4 years on iOS SDK. Have built apps on iPhone, iPod and iPad applications.
So far in my journey i have learned some skills like-

  • Hands on features/services like MapKit, Location based services, Web services based, XML, JSON, PDF, Paypal, in-app Purchases, Core data, iCloud.
  • Hands on e-commerce applications, Social networking applications, Event based applications.
In my journey i have built lots of sample applications to learn different concepts, different frameworks. Just for learning my self. Have come across lots of hurdles- found solutions, tricks and tips to complete the tasks in a easier way.Using these experiences which i gained so far we can build simple applications just like that in no time, and can decide which will be best out of many ways to accomplish the tasks/hurdles building any applications.
  
Now i can say that am a Beginner's Level-2 in iOS development. So want to help my co-developers, who want to start a career in iOS development or Beginner's Level-1. So that you can cross these hurdles in no time and develop great applications in less time.

To start this i will be posting Tutorials, Tips, Tricks, to complete Tasks and many more in this blog. So subscribe to this blog & be in touch to save your time in development. These tips will be really helpful in real time while building apps in many ways, so just have look on it.

Tutorials

Tips

Tricks
This list will be growing on, so keep looking at it every day.

Apart from this if you have some of good blogs or tutorials posted by you, send me a mail/ add in comments with link & description i will share it over here so that it will be useful to many other developers.

If you come across some issues & want any help/guidance from me just add a comment will have a tutorial for that, showing at which time you faced the issue with a solution to that, even with the details of the developer who actually got this issue (if they want so).

You can also suggest or request on what next topics should be?

So keep looking, keep coding, keep developing.

Thanks

Saturday, 20 October 2012

How to make use of Digital Color Meter application in MAC


We have an application in our MAC called "DigitalColor Meter". We can use this application into our application to get the color code for RGB.
Steps:
1)   Open Digital Color Meter application in MAC, can use spot light for easy search.
2)   Keep the required mode to "RGB as Percentage"
3)   Using the mouse pointer go to the required color on the screen.
4)   Note down the RGB values in percentage.
5)   In our code you can use the method 
[UIColor colorWithRed:0.663 green:0.855 blue:0.341 alpha:1]

Convert percentage values into fractions. like 53.5% will become 0.535. Use the respective RGB values in the code, and alpha value must be 1.
Run the application, you will get the exact color required.
For HTML users
In the "DigitalColor Meter" application set the mode to "RGB As actual value, 8-bit", so that you can get the RGB value as decimal number from 0-255. Note this RGB numbers.
  
Use RGB-HEX to get the hexadecimal number of the required color by inserting these RGB values.
for example:
R - 85   G - 20   B - 30
required color in hexadecimal is : #55141E
You can use this hexadecimal value, to get the required color in html code.

Happy Coding.