Creating programmatically a switch (UISwitch)


UISwitch is one of the best framework of UIKit. To create it programmatically, code:

UISwitch *mySwitch = [[UISwitch alloc] initWithFrame:CGRectMake(50, 100, 0, 0)];

Above range allocates an UISwitch and models its shape. UISwitch has resolved measurements (about 95 px extensive, 27px high), so you have to set the harmonizes for top-left part. Size and size are ignored, you can not create swap lesser or larger by modifying the shape.

To add it to your perspective you should use this code:

[self.view addSubview:mySwitch];

Be standard swap is set to Off. You are able to modify it’s condition programmaticaly using setOn method:

[mySwitch setOn:YES animated:YES];

To swap it rear again to Off use:

[mySwitch setOn:NO animated:YES];

In both above situations UISwitch changes it condition with movement (animated:YES), use animated:NO to modify condition without movement.

To have a look at UISwitch present condition use on residence, example:

if (mySwitch.on) NSLog(@"switch state: on");
else NSLog(@"switch state: off");

To avoid modifying the UISwitch condition set the empowered residence to NO:

mySwitch.enabled = NO; // or YES to reenable it

As I said before UISwitch is very easy framework – any measures – holding it causes UISwitch to modify it’s condition, so to telephone any strategy by modifying the UISwitch you have to add a focus on for ValueChanged event:

[mySwitch addTarget:self action:@selector(myMethod) forControlEvents:UIControlEventValueChanged];

or

[mySwitch addTarget:self action:@selector(myMethod:) forControlEvents:UIControlEventValueChanged];

If you need a id to mySwitch item.

Key details UI developers should know when developing for iPad


Here are some points UI designers must keep in mind while developing UI for iPAD apps.

1. iPad’s screen size: 1024px x 768px
2. Status bar height: 20px
3. Screen Space available for the app when running in




Portrait Mode: 768px x 1004px

Landscape Mode: 1024px x 748px


4. iPad Screen PPI: 132
5. iPad Launch Image Names and Sizes

Filename Dimensions
Default-Portrait.png 768px x 1004px
Default-Landscape.png 1024px x 748px
Default-PortraitUpsideDown.png 768px x 1004px
Default-LandscapeLeft.png 1024px x 748px
Default-LandscapeRight.png 1024px x 748px

6. iPad app icon sizes

Application icon (required for all apps) 72px x 72px
App Store icon (required for all apps) 512px x 512px
for Spotlight search results 50px x 50px
for Settings 29px x 29px
Toolbar and navigation bar icons Approximately 20px x 20px
Tab bar icons Approximately 30px x 30px

iPhone and BlackBerry sales restricted in Argentina


The condition of the globe's economic climate is in somewhat of a chaos currently, with many nations around the world having difficulties to get their economic climate under control. One such nation is Argentina, and this indicates they have taken actions to try to secure their economic climate by prohibiting the revenue of the iPhone and BlackBerry gadgets in the nation.

According to an document over on The apple company Core by way of Instructions.ws, the Argentinean authorities has determined to place a non permanent ban on the revenue of both the iPhone and BlackBerry smartphones on the market in an try to slowly blowing up and hopefully appropriate the gap between the peso and the US dollars.

Furthermore seemingly the Argentinean authorities has also determined that in order for the iPhone to again go available in the nation, The apple company is necessary to either develop a developing facility in Argentina or lover with a regional vendor to make iPhone models.

The term is Research IN Movement is already looking at joining up an present vendor so they can have the revenue ban put on BlackBerry gadgets. Competing organizations such as New sony, Htc, Samsung and LG have already designed vegetation or have joined organizations in Argentina so are not involved in the ban.

Word is currently Apple’s Argentina website has become effective, however this indicates service provider internet sites in Argentina have stopped providing the iOS mobile phone.

So there you go, if you stay in Argentina as of now it would appear you can not purchase the iPhone or a BlackBerry mobile phone, and this will proceed for the long run.

If you have experienced this Mobile phone devices Evaluation document you can add me to your groups on Google+ and I will of course add you back.

Key information to prevent Apple’s iOS app rejection


An app concept or products app requires much of cash financial commitment to get into app world everyday living. The significant problem to it’s achievements could be Apple’s evaluation procedure. There can be several factors for Apple’s rejections for your app. With our excellent understanding of iOS applications progression since the day The apple company released their SDK, we are able to obtain useful ideas into Apple’s evaluation procedure.

This will help:

1. Designers to spend less their some time to initiatives.

2. Let you strategy for a better buyer which is the key objective behind all the app keep recommendations.

There are few key details which every iPhone/iPad creator should know when producing an app for The apple company gadgets.

Key things to prevent Apple’s app rejection:

1. Bugs/Crashes- The most typical objective for any app to get refused are cold and consistent failures. Make sure you analyze it on several gadgets, different OS versions and particularly under various system circumstances. Peer-to-peer reviews/testing done by developers would certainly help. If your app failures or does not answer during the app evaluation by Apple’s examining group then it will definitely be refused.

2. Value Download- You cannot create an app that downloads available and completes concept that was not existing in the app deal presented to The apple company.

3. Identical Icons- The app keep 512×512 symbol should be same as the app’s 57×57 symbol. Even though there is no such immediate concept in contract/agreement with The apple company, its their keep and they result in the guidelines for opinions. If your app’s symbol on phone and app keep symbol do not go with, The apple company will condition having un-matching designs to decline the app.

4. Network Connectivity- You must advise the customer if system is out of stock. Just having the rotating fast paced symbol existing and a concept saying “trying to connect” is against the recommendations. Appropriate concept is required at all the displays to express clear concept if system is not available after certain time period. Many developers put their connection assessments on Apple’s Reachability concept, which is using that example concept for the incorrect objective. If you need to get information from a particular hosting server, then try to obtain some information from that website.

5. “Free+Paid” apps- The apple company revealed to few developers that app may get refused, if it contains aesthetically incapable keys, driving the customer to update for the complete edition or showing the price of complete edition in the Free edition. So, iPhone developers must make sure that they adhere to all the guidelines.

6. Constant Option Images- If an iPhone creator wants to use Apple’s existing picture for his button then see that features resemble because you can use a normal button in a non-standard way if your app is offering a “immersive environment” so it is better to make your own button. If there are any versions with operate then again The apple company might decline the app.

It is always recommended for an iPhone creator to use their own customized keys in the app

7. iOS edition support- If you strategy on posting and app which operates with 3.0 and greater versions, you should be sure that it operates completely on all the versions from the iOS 3.0 to the most existing edition. The apple company will analyze it with the newest edition to see the prospective of the app but if the app isn't able to confirm itself The apple company will definitely refused your app.

8. Dealings outside The App Store-

Apple do not allow developers to perform any transaction/business outside the app keep. In App buys are the suggested way to put into practice these purchase. Latest statement to allow outside transaction purchase with certain reduction and Apple’s amount take from cash for the same is more difficult and would take more a chance to negotiate down in strategic enterprise strategy of applications purchase.

9. Personal API:s

Apple stringently decline applications which are employing plans using Personal APIs. The apple company has plans that can check your app requirements for offenses. If you want to prevent app denial from app keep make sure you study the creator recommendations properly before employing any API noted private by The apple company.

10. Popovers-

It is definitely not suggested to release one popover from within another popover. The iPad People User interface Guidelines clearly provides this information that only one popover factor should be found on-screen each time.

There can be many more factors behind Apple’s denial of any iOS app. However, the collection provides very apparent ones.

Objective C Protocol


“A strategy is simply a collection of strategy conditions, separate to a training description. (In Coffee, program is symbolic of strategy.)”

Protocols assert techniques that can be integrated by any training. Methods are useful in at least three situations:

    To assert techniques that others are required to implement
    To assert the program to an item while covering its class
    To take parallels among sessions that are not hierarchically related

Classes in not relevant offices of the monetary gift structure might be searched as well because they comply with the same strategy.

Protocols collection techniques that are (or may be) integrated somewhere, but the personality of the training that tools them is not of attention. What is of attention is whether or not a particular training shapes to the protocol—whether it has implementations of the techniques the strategy reports. Thus items can be arranged into kinds not just on the foundation parallels as a result of getting from the same training, but also on the foundation their likeness in contouring to the same strategy.

Cocoa has relaxed protocols as well as proper protocols. An relaxed strategy is a classification on the NSObject training, thus making any item a prospective implementer of any strategy in the classification (see “Categories”). The techniques in an relaxed strategy can be precisely integrated. Informal protocols are part of the rendering of the delegation process in Mac OS X (see “Delegation”).

Formal protocols unconditionally need the contouring training to put into practice all announced techniques. However, they can level individual techniques or categories of techniques with the @optional information, and the contouring training may choose to put into practice those. They are also fragile; once you determine a strategy and make it available to other sessions, upcoming changes to it (except for extra optionally available methods) can separate those sessions.e

Powered by Blogger.
Twitter Delicious Facebook Digg Stumbleupon Favorites More