Subclassing UItextview

2011-06-04 Thread Philip Vallone
Hi,

I am taking a shot at creating a Twitter App. I was wondering if its possible 
to Subclass UItextview to detect hashes and respond to them. For example:

"This is a tweet #iamtrending"

I've seen this done in other Apps, but not sure where to start.

Thanks for the help.

Phil



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Subclassing UItextview

2011-06-04 Thread Fritz Anderson
On 4 Jun 2011, at 8:32 AM, Philip Vallone wrote:

> I am taking a shot at creating a Twitter App. I was wondering if its possible 
> to Subclass UItextview to detect hashes and respond to them. For example:
> 
> "This is a tweet #iamtrending"
> 
> I've seen this done in other Apps, but not sure where to start.

UITextView does not render multiple styles, nor offer link-like behavior. To 
subclass, you'd have to rip out most of the implementation. If you want those 
things, use UIWebView, which is what the other apps (at least the ones written 
by sane people) are doing. Convert the hash-tags to  content, with a CSS 
class for special rendering, and your own URL scheme for capturing your special 
action for touches.

— F

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Subclassing UItextview

2011-06-04 Thread Philip Vallone
Thanks Fritz.

This is a great suggestion.



On Jun 4, 2011, at 10:22 AM, Fritz Anderson wrote:

> On 4 Jun 2011, at 8:32 AM, Philip Vallone wrote:
> 
>> I am taking a shot at creating a Twitter App. I was wondering if its 
>> possible to Subclass UItextview to detect hashes and respond to them. For 
>> example:
>> 
>> "This is a tweet #iamtrending"
>> 
>> I've seen this done in other Apps, but not sure where to start.
> 
> UITextView does not render multiple styles, nor offer link-like behavior. To 
> subclass, you'd have to rip out most of the implementation. If you want those 
> things, use UIWebView, which is what the other apps (at least the ones 
> written by sane people) are doing. Convert the hash-tags to  content, with 
> a CSS class for special rendering, and your own URL scheme for capturing your 
> special action for touches.
> 
>   — F
> 

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


disable multitouch gestures globally - possible? (mac OS X)

2011-06-04 Thread Martin Batholdy
Hi,

Is it possible to disable multi-touch gestures on the trackpad globally with a 
cocoa application that is background only?
Meaning that swipe- and other gestures (except 4-finger gestures) won't work 
anymore in any program using this gestures.



thanks!___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Subclassing UItextview

2011-06-04 Thread Conrad Shultz
On Jun 4, 2011, at 7:22, Fritz Anderson  wrote:
> 
> UITextView does not render multiple styles, nor offer link-like behavior. To 
> subclass, you'd have to rip out most of the implementation. If you want those 
> things, use UIWebView, which is what the other apps (at least the ones 
> written by sane people) are doing. Convert the hash-tags to  content, with 
> a CSS class for special rendering, and your own URL scheme for capturing your 
> special action for touches.

An app I wrote had need for similar functionality and I went the webview route 
at first. Unfortunately, UIWebView has a number of drawbacks that make it less 
than ideal.

In my case there was an inevitable small but noticeable delay before it would 
render contents, even locally loaded HTML. This bug may be fixed now - I 
haven't checked. 

A bigger problem for something like a Twitter app, one that I never resolved, 
is how to size reasonably when presented with HTML to render. In my case I 
wanted a webview that was effectively the -sizeThatFits. Unfortunately AFAICT 
there is no way to calculate this until after the view finished loading, which 
resulted in the view briefly "snapping" to size. I considered rendering off 
screen to workaround this issue, but IIRC UIWebView played some games to 
suppress off screen rendering (presumably for performance).  I ended up using 
NSString's UIKit additions to estimate size (since I had a finite set of known 
fonts in the webview) but this failed from time to time due to minute rendering 
differences between UIWebView and Core Graphics. 

Finally, depending on how many webviews you use, you might massacre the 
performance of UITableView scrolling. 

For these various reasons I ended up scrapping UIWebView in favor of various 
home-brewed substitutes. Since this was in the pre-Core Text days, I ended up 
using a combination of layered UILabel subviews and directly drawn NSStrings. I 
am in the process of migrating this fairly messy implementation to Core Text 
which should resolve all the above and provide a cleaner implementation.

UIWebView has the not insignificant virtue of being easy; Core Text is not for 
the faint of heart. (The aforementioned obsolete solution was one of my first 
challenges in Cocoa that didn't have a nice book implementation. And boy did I 
have to learn a lot for a noob.)

I should note that I do not believe that most other Twitter apps are using 
UIWebView. For example, there is Loren Brichter's original post re: string 
drawing and view compositing in Tweetie-now-Twitter:

http://blog.atebits.com/2008/12/fast-scrolling-in-tweetie-with-uitableview/

IIRC, Twitterrific also uses a similar (if not identical) approach. 

If you are looking for something not UIWebView (but which has its own set of 
headaches, particularly bloat) you can check out the Three20 library. I have 
used its TTStyledText system (which incorporates link handling) for quick and 
dirty solutions in the past. 

Good luck (and others on the list: please chime in if UIWebView has evolved 
greatly and my concerns are unfounded).

(Sent from my iPhone.)

--
Conrad Shultz
www.synthetiqsolutions.com___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: inApp Purchases

2011-06-04 Thread John Joyce
File a bug, and consider using a DTS incident.

On Jun 4, 2011, at 1:39 AM, Development wrote:

> I found the answer to this after I found a json validator on google.
> 
> The json object I was getting back IS INVALID
> 
> it is missing the leading "{" character. 
> Add that to the returned object and it parses just fine.
> Here's the problem... Either  it's a problem on my end in the receiving, or 
> one on apple's end... either way it could get corrected
> if that happens then adding the leading "{" will cause a failure and people 
> that paid will not get what they paid for.
> 
> not sure how to fix this.
> 
> On Jun 3, 2011, at 10:37 PM, Development wrote:
> 
>> How do you decode the information sent from apple when you verify a receipt?
>> 
>> 
>> I send the data to apple and they send what appears to be a json object back
>> however I have tried a bunch of ways to decode the json object and all I get 
>> is a null return.
>> 
>> I'm using a php script for the verify.
>> 
>> 
>> Is there something about the return data that I am 
>> missing?___
>> 
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>> 
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>> 
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/cocoa-dev/development%40fornextsoft.com
>> 
>> This email sent to developm...@fornextsoft.com
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/jjoyce%40apple.com
> 
> This email sent to jjo...@apple.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Subclassing UItextview

2011-06-04 Thread Philip Vallone
Thank you Conrad for your feedback.

> Finally, depending on how many webviews you use, you might massacre the 
> performance of UITableView scrolling. 

Luckily, I am not using UITableView. I have implement the UIWebView and it 
works well. I am not sure if the issues you mentioned are still issues, but in 
my situation, using the UIWebView allows for a lot of control over the look and 
feel using javascript and HTML.

Thanks again.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Good and updated book for iPhone development

2011-06-04 Thread Roshne
The best that I've seen so far that also covers Xcode 4 is Programming iOS 4
by Matt Neuburg

http://oreilly.com/catalog/0636920010258

I've found it to be a really good book to get me started, things are
explained in a way that is easy for me to understand.


--
Rod Shelton
ros...@gmail.com


On Thu, Jun 2, 2011 at 4:37 AM, Wilker  wrote:

> Hi Guys,
>
> I have some general experience on programming (8 years) but I'm just
> starting on Cocoa / Objective-C world now.
> Currently I'm reading the: Cocoa Programming by Pragmatic
> Programmers
> This book is a nice
> intro and cover the basics nice, but after I finish it I wanna get some
> book
> for iPhone specific stuff, if possible some updated book for XCode 4 and
> iOS
> 4.
>
> What you guys can recommend to me?
>
> Thanks
> ---
> Wilker Lúcio
> http://about.me/wilkerlucio/bio
> Kajabi Consultant
> +55 81 82556600
> ___
>
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/roshne%40gmail.com
>
> This email sent to ros...@gmail.com
>
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Good and updated book for iPhone development

2011-06-04 Thread Steve Norman
On Jun 2, 2011, at 4:37 AM, Wilker  wrote:

> Hi Guys,
> 
> I have some general experience on programming (8 years) but I'm just
> starting on Cocoa / Objective-C world now.
> Currently I'm reading the: Cocoa Programming by Pragmatic
> Programmers
> This book is a nice
> intro and cover the basics nice, but after I finish it I wanna get some book
> for iPhone specific stuff, if possible some updated book for XCode 4 and iOS
> 4.
> 
> What you guys can recommend to me?

I read this week that Big Nerd Ranch's iPhone book has gone to the printers and 
was going to be available July 1st.  It has been updated for XCode 4.  

I do wonder if it might be prudent to wait and see what happens next week at 
WWDC before picking anything up though.

Steve___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Good and updated book for iPhone development

2011-06-04 Thread Geoffrey GOUTALLIER
There is an upcoming book from Aaron Hillegass @ Big Nerd Ranch :

iOS Programming: The Big Nerd Ranch Guide < 
http://www.amazon.com/iOS-Programming-Ranch-Guide-Guides/dp/0321773772/ref=sr_1_1?ie=UTF8&qid=1306951634&sr=8-1
 >

Haven't read it yet, as it is not yet released, but I think that it will be a 
great book, as the Cocoa Programming book, still from Aaron, is a must have.
++

Geoffrey
 
On 4 juin 2011, at 07:42, Rikza Azriyan wrote:

> Beginning iphone 4 prograaming by jeff lamarche i tought
> 
> 
> Rikza Azriyan
> Student of Sriwijaya University
> Palembang, Indonesia
> 
> Sent from my iPhone 4
> Provided by Telkomsel.
> 
> On Jun 4, 2011, at 11:46 AM, David Rowland  wrote:
> 
>> I like "Programming iOS4" by Matt Neuburg (O'Reilly)
>> 
>> David
>> 
>> 
>> On Jun 2, 2011, at 1:37 AM, Wilker wrote:
>> 
>>> Hi Guys,
>>> 
>>> I have some general experience on programming (8 years) but I'm just
>>> starting on Cocoa / Objective-C world now.
>>> Currently I'm reading the: Cocoa Programming by Pragmatic
>>> Programmers
>>> This book is a nice
>>> intro and cover the basics nice, but after I finish it I wanna get some book
>>> for iPhone specific stuff, if possible some updated book for XCode 4 and iOS
>>> 4.
>>> 
>>> What you guys can recommend to me?
>>> 
>>> Thanks
>>> ---
>>> Wilker Lúcio
>>> http://about.me/wilkerlucio/bio
>>> Kajabi Consultant
>>> +55 81 82556600
>>> ___
>>> 
>>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>>> 
>>> Please do not post admin requests or moderator comments to the list.
>>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>> 
>>> Help/Unsubscribe/Update your Subscription:
>>> http://lists.apple.com/mailman/options/cocoa-dev/rowlandd%40sbcglobal.net
>>> 
>>> This email sent to rowla...@sbcglobal.net
>> 
>> ___
>> 
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>> 
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>> 
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/cocoa-dev/rikzaxtrmsprt%40yahoo.com
>> 
>> This email sent to rikzaxtrms...@yahoo.com
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/coding%40farfadet.net
> 
> This email sent to cod...@farfadet.net

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


crash in ThemeTextRelease

2011-06-04 Thread Jeremy Todd
Hello,

We recently released an application with a crash reporter in it, and we're 
regularly getting a crash in the field with a call stack similar to this (not 
always identical though):

crash reason EXC_BREAKPOINT / EXC_I386_BPT crash address 0x9732b631

Frame   Module  Signature [Expand]  Source
0   CoreFoundation  __HALT  
1   CoreFoundation  __CFBasicHashRehash 
2   CoreFoundation  __CFBasicHashAddValue   
3   CoreFoundation  CFBasicHashAddValue 
4   CoreFoundation  CFDictionaryAddValue
5   HIToolbox   TThemeTextCache::Release
6   HIToolbox   ThemeTextRelease
7   HIToolbox   DataEngine::GetTextDimensions   
8   HIToolbox   HIThemeGetTextDimensions
9   HIToolbox   GetThemeTextDimensions  
10  HIToolbox   HIStandardMenuView::HIStandardMenuView  
11  HIToolbox   HIStandardMenuView::Construct   
12  HIToolbox   HIView::EventHandler
13  HIToolbox   HIObject::Construct 
14  HIToolbox   HIObject::Create
15  HIToolbox   HIObjectCreate  
16  HIToolbox   MenuData::CreateMenuContentView 
17  HIToolbox   MenuData::GetModalView  
18  HIToolbox   HIMenuGetContentView
19  ShortcutShortcut@0x2319 
20  ShortcutShortcut@0x2113 
21  HIToolbox   DispatchEventToHandlers 
22  HIToolbox   SendEventToEventTargetInternal  
23  HIToolbox   SendEventToEventTargetWithOptions   
24  HIToolbox   SendTrackingStatus  
25  HIToolbox   SendBeginTracking   
26  HIToolbox   SetupMenuTracking   
27  HIToolbox   MenuSelectCore  
28  HIToolbox   _HandleMenuSelection2   
29  HIToolbox   _HandleMenuSelection
30  AppKit  _NSHandleCarbonMenuEvent
31  AppKit  _DPSNextEvent   
32  AppKit  -[NSApplication 
nextEventMatchingMask:untilDate:inMode:dequeue:]
33  AppKit  -[NSApplication run]

It seems to consistently relate to menus, eventually calling in to "HIToolbox 
ThemeTextRelease". I looked online and found a few other references to crashes 
with similar call stacks. Interestingly they were all in audio apps (Cubase, 
Ableton Live, and our iZotope RX), so perhaps they would all be using 
CoreAudio, but I can't see what that would have to do with the crash. Some of 
the crashes are more than 2 years old, and our reports are happening regularly 
even now, across 10.5 and 10.6.

Does anyone know of any issues with menus or text that might be relevant here? 
Or can anyone suggest a place for us to look in our app's code to find the 
cause? It seems like our use of NSMenu is suspect (we build and rebuild our 
app's menus quite often) so we'll certainly take a closer look there.

Regards,
Jeremy


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: crash in ThemeTextRelease

2011-06-04 Thread Kyle Sluder
On Sat, Jun 4, 2011 at 9:13 AM, Jeremy Todd  wrote:
> Does anyone know of any issues with menus or text that might be relevant 
> here? Or can anyone suggest a place for us to look in our app's code to find 
> the cause? It seems like our use of NSMenu is suspect (we build and rebuild 
> our app's menus quite often) so we'll certainly take a closer look there.

I'd start by turning on zombies and making sure you're not
accidentally over-releasing an NSMenu.

--Kyle Sluder
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


iOS: Manually setting orientation makes a mess out of my interface

2011-06-04 Thread Development
Ok

when my application first starts up I want it in portrait mode. However when a 
user switches to an editor it needs to transform in to landscape mode.

I have this working more or less correctly.

However, when I leave the editor, it switches back to portrait amd all of the 
portrait views are a mess.

I was able to get the very first portrait view to display correctly.
But when I switch to a new portrait view it has been resized to 460px high. And 
no matter what I do I absolutely cannot set it back to the correct 480px high.
nor can I get it to display lower on the screen to correct the display 

I've attempted to change both the bounds and frame and nothing happens it seems 
to have become read only.

How does one correct view sizes and origins when switching back from a manually 
set orientation to the original one?

this is my rotator:

-(void)rotateMainViewToOrientation:(UIDeviceOrientation)orientation
{


[UIView beginAnimations:@"View Flip" context:nil];
[UIView setAnimationDuration:.5];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];

[[UIApplication sharedApplication] setStatusBarHidden:NO animated:NO];  
   

[[UIApplication sharedApplication]setStatusBarOrientation:orientation];
//NSLog(@"2");

CGPoint newOrig =CGPointMake(0.0, 0.0);
int dir = 90;
if(!ISIPAD){
if (orientation == UIDeviceOrientationLandscapeLeft || orientation == 
UIDeviceOrientationLandscapeRight){
if (orientation == UIDeviceOrientationLandscapeRight) {
dir = 270;
}
self.view.frame = CGRectMake(0.0, 0.0, 480, 320);
self.view.center = CGPointMake(160.0f, 240.0f);
}
else{


if(self.view.frame.size.width >320){
 //does nothing
newOrig.x = -80;
newOrig.y = 80;


}
self.view.center = CGPointMake(240.0f, 160.0);
if(orientation == UIDeviceOrientationPortrait){
dir = 0;
}
else{
dir = 180.0;
}
}
}
else {
if (orientation == UIDeviceOrientationLandscapeLeft || orientation == 
UIDeviceOrientationLandscapeRight){
if (orientation == UIDeviceOrientationLandscapeRight) {
dir = 270;
}
else dir = 90;
self.view.frame = CGRectMake(0.0, 0.0, 1024, 768);
self.view.center = CGPointMake(1024.0/2.0f, 768.0/2.0f);
}
}
self.view.transform = CGAffineTransformIdentity;
self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(dir));
self.view.transform = CGAffineTransformTranslate(self.view.transform, 
newOrig.x, newOrig.y);
 
[UIView commitAnimations];
}___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: iOS: Manually setting orientation makes a mess out of my interface

2011-06-04 Thread Development
k.. at this point I'm begging
can any one tell me how to shift from portrait to landscape and back again.
I know this is possible I see it in games all the time.

On Jun 4, 2011, at 8:31 PM, Development wrote:

> Ok
> 
> when my application first starts up I want it in portrait mode. However when 
> a user switches to an editor it needs to transform in to landscape mode.
> 
> I have this working more or less correctly.
> 
> However, when I leave the editor, it switches back to portrait amd all of the 
> portrait views are a mess.
> 
> I was able to get the very first portrait view to display correctly.
> But when I switch to a new portrait view it has been resized to 460px high. 
> And no matter what I do I absolutely cannot set it back to the correct 480px 
> high.
> nor can I get it to display lower on the screen to correct the display 
> 
> I've attempted to change both the bounds and frame and nothing happens it 
> seems to have become read only.
> 
> How does one correct view sizes and origins when switching back from a 
> manually set orientation to the original one?
> 
> this is my rotator:
> 
> -(void)rotateMainViewToOrientation:(UIDeviceOrientation)orientation
> {
> 
> 
>   [UIView beginAnimations:@"View Flip" context:nil];
>   [UIView setAnimationDuration:.5];
>   [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
>   
>   [[UIApplication sharedApplication] setStatusBarHidden:NO animated:NO];  
>
> 
>[[UIApplication sharedApplication]setStatusBarOrientation:orientation];
>//NSLog(@"2");
> 
>CGPoint newOrig =CGPointMake(0.0, 0.0);
>int dir = 90;
>   if(!ISIPAD){
>if (orientation == UIDeviceOrientationLandscapeLeft || orientation == 
> UIDeviceOrientationLandscapeRight){
>if (orientation == UIDeviceOrientationLandscapeRight) {
>dir = 270;
>}
>   self.view.frame = CGRectMake(0.0, 0.0, 480, 320);
>   self.view.center = CGPointMake(160.0f, 240.0f);
>}
>else{
> 
> 
>if(self.view.frame.size.width >320){
> //does nothing
>newOrig.x = -80;
>newOrig.y = 80;
> 
> 
>}
>self.view.center = CGPointMake(240.0f, 160.0);
>if(orientation == UIDeviceOrientationPortrait){
>dir = 0;
>}
>else{
>dir = 180.0;
>}
>}
>   }
>   else {
>if (orientation == UIDeviceOrientationLandscapeLeft || orientation == 
> UIDeviceOrientationLandscapeRight){
>if (orientation == UIDeviceOrientationLandscapeRight) {
>dir = 270;
>}
>else dir = 90;
>self.view.frame = CGRectMake(0.0, 0.0, 1024, 768);
>self.view.center = CGPointMake(1024.0/2.0f, 768.0/2.0f);
>}
>   }
>self.view.transform = CGAffineTransformIdentity;
>self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(dir));
>self.view.transform = CGAffineTransformTranslate(self.view.transform, 
> newOrig.x, newOrig.y);
> 
>   [UIView commitAnimations];
> }___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/development%40fornextsoft.com
> 
> This email sent to developm...@fornextsoft.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com