[MonoTouch] RE: Flipboard for iPhone page flip effect

Pavel Sich pavel.sich at me.com
Wed Dec 7 15:21:53 EST 2011


I believe that this is what they do (or at least, this is how I would go with it): 

1) get image content of the view I want to flip with: 
UIGraphics.BeginImageContext (view.Bounds.Size);
view.Layer.RenderInContext (UIGraphics.GetCurrentContext ());
var viewImage = UIGraphics.GetImageFromCurrentImageContext ();
UIGraphics.EndImageContext ();

2) then just split the view in half and place it in two UIImageViews

3) place these two views on top of your view you want to appear being flipped (folded)

4) using the view.layer.transform call the rotation transformation with pivot point exactly at the top and middle of the view, which will make it appear to flip and fold there

5) job done, have drink :-)

Cheers & happy coding. 

--
Pavel Sich
@sichy


On Wednesday, December 7, 2011 at 8:55 PM, monotouch-request at lists.ximian.com wrote:

> Send MonoTouch mailing list submissions to
> monotouch at lists.ximian.com (mailto:monotouch at lists.ximian.com)
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.ximian.com/mailman/listinfo/monotouch
> or, via email, send a message with subject or body 'help' to
> monotouch-request at lists.ximian.com (mailto:monotouch-request at lists.ximian.com)
> 
> You can reach the person managing the list at
> monotouch-owner at lists.ximian.com (mailto:monotouch-owner at lists.ximian.com)
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of MonoTouch digest..."
> 
> 
> Today's Topics:
> 
> 1. Re: Very weird crash (Rodrigo Kumpera)
> 2. Re: Can no longer debug on iPad device. Please Help (sisnaz)
> 3. Flipboard for iPhone page flip effect (Steve Eichert)
> 4. Localization of system controls (johnHolmes)
> 5. Hanging when "Updating Xcode project" (Mg)
> 6. Re: Localization of system controls (Robert Jordan)
> 7. Re: Localization of system controls (Robert Jordan)
> 8. Still IntPtr Constructor issues (Rene Ruppert)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Wed, 7 Dec 2011 15:08:32 -0200
> From: Rodrigo Kumpera <kumpera at xamarin.com (mailto:kumpera at xamarin.com)>
> Subject: Re: [MonoTouch] Very weird crash
> To: Pavel Sich <pavel.sich at me.com (mailto:pavel.sich at me.com)>
> Cc: monotouch at lists.ximian.com (mailto:monotouch at lists.ximian.com)
> Message-ID:
> <CAF+QqDqWAHmSmqXpsaYuLP0kE_JEVzKqWEYYM=Np6NVLcSeYRw at mail.gmail.com (mailto:Np6NVLcSeYRw at mail.gmail.com)>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Hi Pavel,
> 
> Can you fill a bug report with a reproducible test case. A pie on the sky
> guess would be that you have some types that are been linked away
> and this is causing this error.
> 
> At the very least, MT should be fixed to give you an usable error message.
> 
> 
> 
> On Wed, Dec 7, 2011 at 2:19 PM, Pavel Sich <pavel.sich at me.com (mailto:pavel.sich at me.com)> wrote:
> 
> > From time to time we receive error: Assertion at
> > ../../../../../mono/mono/metadata/object.c:1779 complaining that the object
> > is not of type class (it tries to ensure that the parameter is not value
> > type) and app subsequently crashes.
> > 
> > From desymbolicated crash log and stack trace, we can see it happens just
> > after to the call to our code that is using JSON with objects attributed
> > with [DataContract] and members with [DataMember], however these are plain
> > wrapper classes that have no functional code in them. Just plain data
> > contract classes.
> > 
> > Has anyone experienced similar issues? This is pretty bad for us, we are
> > close to production of major financial app and this is making us nervous as
> > all seems bit too fragile to depend on it.
> > 
> > Any help is appreciated.
> > 
> > --
> > Pavel Sich
> > @sichy
> > 
> > 
> > _______________________________________________
> > MonoTouch mailing list
> > MonoTouch at lists.ximian.com (mailto:MonoTouch at lists.ximian.com)
> > http://lists.ximian.com/mailman/listinfo/monotouch
> > 
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://lists.ximian.com/pipermail/monotouch/attachments/20111207/61512d14/attachment-0001.html 
> 
> ------------------------------
> 
> Message: 2
> Date: Wed, 7 Dec 2011 09:15:26 -0800 (PST)
> From: sisnaz <jdegrey at comcast.net (mailto:jdegrey at comcast.net)>
> Subject: Re: [MonoTouch] Can no longer debug on iPad device. Please
> Help
> To: monotouch at lists.ximian.com (mailto:monotouch at lists.ximian.com)
> Message-ID: <1323278126824-4169744.post at n4.nabble.com (mailto:1323278126824-4169744.post at n4.nabble.com)>
> Content-Type: text/plain; charset=us-ascii
> 
> Hi Rolf, I was running MonoTouch version 5.0.1. I just updated to 5.0.3 this
> morning and it seems to be working again. 
> 
> (bang head on keyboard to continue)
> 
> -----
> There was only 1 trilogy
> --
> View this message in context: http://monotouch.2284126.n4.nabble.com/Can-no-longer-debug-on-iPad-device-Please-Help-tp4167817p4169744.html
> Sent from the MonoTouch mailing list archive at Nabble.com (http://Nabble.com).
> 
> 
> ------------------------------
> 
> Message: 3
> Date: Wed, 7 Dec 2011 12:17:35 -0500
> From: Steve Eichert <steve.eichert at gmail.com (mailto:steve.eichert at gmail.com)>
> Subject: [MonoTouch] Flipboard for iPhone page flip effect
> To: monotouch at lists.ximian.com (mailto:monotouch at lists.ximian.com)
> Message-ID:
> <CAAefnVLs1knPkuAAC5V-SJvGtkG+zYveEaaKNBnfdzqj_c2oxg at mail.gmail.com (mailto:CAAefnVLs1knPkuAAC5V-SJvGtkG+zYveEaaKNBnfdzqj_c2oxg at mail.gmail.com)>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Can anyone offer any guidance or suggestions on how to create a page
> flip effect similar to what the Flipboard for iPhone app provides?
> 
> http://www.flipboard.com/
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://lists.ximian.com/pipermail/monotouch/attachments/20111207/b29e335b/attachment-0001.html 
> 
> ------------------------------
> 
> Message: 4
> Date: Wed, 7 Dec 2011 10:00:26 -0800 (PST)
> From: johnHolmes <francesco.colombo at gmail.com (mailto:francesco.colombo at gmail.com)>
> Subject: [MonoTouch] Localization of system controls
> To: monotouch at lists.ximian.com (mailto:monotouch at lists.ximian.com)
> Message-ID: <1323280826470-4169889.post at n4.nabble.com (mailto:1323280826470-4169889.post at n4.nabble.com)>
> Content-Type: text/plain; charset=us-ascii
> 
> Hi, 
> 
> I'have recently developed a small application using monotouch. The
> applications works fine except I'm unable to have "system" or "specialized"
> controls like UITabBarItems or MFMailComposeViewController localized
> (translated) in languages other then English. My testing device is an
> iphone4 and is configured to use Italian as culture. The application runs
> fine, but titles of UITabBarItems or the buttons of the 
> MFMailComposeViewController still show English text. How to have them
> translated in Italian?
> 
> thanks
> 
> Francesco
> 
> --
> View this message in context: http://monotouch.2284126.n4.nabble.com/Localization-of-system-controls-tp4169889p4169889.html
> Sent from the MonoTouch mailing list archive at Nabble.com (http://Nabble.com).
> 
> 
> ------------------------------
> 
> Message: 5
> Date: Wed, 7 Dec 2011 10:05:56 -0800 (PST)
> From: Mg <mgreger at cinci.rr.com (mailto:mgreger at cinci.rr.com)>
> Subject: [MonoTouch] Hanging when "Updating Xcode project"
> To: monotouch at lists.ximian.com (mailto:monotouch at lists.ximian.com)
> Message-ID: <1323281156383-4169908.post at n4.nabble.com (mailto:1323281156383-4169908.post at n4.nabble.com)>
> Content-Type: text/plain; charset=us-ascii
> 
> Running MonoDevelop 2.8.4.1 and the latest Mono and MonoTouch and using
> Xcode's interface builder.
> 
> I am working on a universal app and I just started working on the iPad xib
> files in Xcode when this problem showed up. Everything has been fine with
> iPhone xib's up to this point so I don't know if it was caused by the latest
> version update or something else.
> 
> After returning from making changes to my xib in Xcode (nothing special,
> just a few buttons and labels), MonoDevelop will become unresponsive for up
> to a couple minutes while "Updating Xcode project". Eventually it will time
> out with this message:
> 
> System.Exception: Error ScriptError: Xcode got an error: AppleEvent timed
> out.
> at MonoDevelop.MacInterop.AppleScript.Run (Boolean compile,
> MonoDevelop.MacInterop.AEDesc& scriptData) [0x00012] in
> /private/tmp/source/monodevelop/main/src/addins/MacPlatform/MacInterop/AppleScript.cs:107 
> at MonoDevelop.MacInterop.AppleScript.Run (System.String scriptSource)
> [0x00010] in
> /private/tmp/source/monodevelop/main/src/addins/MacPlatform/MacInterop/AppleScript.cs:83 
> at MonoDevelop.MacInterop.AppleScript.Run (System.String
> scriptSourceFormat, System.Object[] args) [0x00000] in
> /private/tmp/source/monodevelop/main/src/addins/MacPlatform/MacInterop/AppleScript.cs:74 
> at MonoDevelop.MacDev.XcodeSyncing.XcodeMonitor.OpenProject () [0x00006]
> in
> /private/tmp/source/monodevelop/main/src/addins/MonoDevelop.MacDev/XcodeSyncing/XcodeMonitor.cs:343 
> at MonoDevelop.MacDev.XcodeSyncing.XcodeMonitor.UpdateProject
> (IProgressMonitor monitor, System.Collections.Generic.List`1 allItems,
> MonoDevelop.MacDev.XcodeIntegration.XcodeProject emptyProject) [0x0037b] in
> /private/tmp/source/monodevelop/main/src/addins/MonoDevelop.MacDev/XcodeSyncing/XcodeMonitor.cs:146 
> at MonoDevelop.MacDev.XcodeSyncing.XcodeProjectTracker.UpdateXcodeProject
> (IProgressMonitor monitor) [0x00000] in
> /private/tmp/source/monodevelop/main/src/addins/MonoDevelop.MacDev/XcodeSyncing/XcodeProjectTracker.cs:315
> 
> --
> View this message in context: http://monotouch.2284126.n4.nabble.com/Hanging-when-Updating-Xcode-project-tp4169908p4169908.html
> Sent from the MonoTouch mailing list archive at Nabble.com (http://Nabble.com).
> 
> 
> ------------------------------
> 
> Message: 6
> Date: Wed, 07 Dec 2011 19:44:51 +0100
> From: Robert Jordan <robertj at gmx.net (mailto:robertj at gmx.net)>
> Subject: Re: [MonoTouch] Localization of system controls
> To: monotouch at lists.ximian.com (mailto:monotouch at lists.ximian.com)
> Message-ID: <jboc88$g1i$1 at dough.gmane.org (mailto:1 at dough.gmane.org)>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> Hi,
> 
> On 07.12.2011 19:00, johnHolmes wrote:
> > I'have recently developed a small application using monotouch. The
> > applications works fine except I'm unable to have "system" or "specialized"
> > controls like UITabBarItems or MFMailComposeViewController localized
> > (translated) in languages other then English. My testing device is an
> > iphone4 and is configured to use Italian as culture. The application runs
> > fine, but titles of UITabBarItems or the buttons of the
> > MFMailComposeViewController still show English text. How to have them
> > translated in Italian?
> > 
> 
> 
> Add this to your Info.plist using a text editor:
> 
> <key>CFBundleDevelopmentRegion</key>
> <string>it</string>
> 
> Previous MonoDevelop versions used to have GUI for this setting (IIRC),
> but I can't find it anymore. Maybe it got lost during the redesign
> of the Info.plist editor...
> 
> Robert
> 
> 
> 
> ------------------------------
> 
> Message: 7
> Date: Wed, 07 Dec 2011 20:46:03 +0100
> From: Robert Jordan <robertj at gmx.net (mailto:robertj at gmx.net)>
> Subject: Re: [MonoTouch] Localization of system controls
> To: monotouch at lists.ximian.com (mailto:monotouch at lists.ximian.com)
> Message-ID: <jbofr7$agg$1 at dough.gmane.org (mailto:1 at dough.gmane.org)>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> On 07.12.2011 19:44, Robert Jordan wrote:
> > Hi,
> > 
> > On 07.12.2011 19:00, johnHolmes wrote:
> > > I'have recently developed a small application using monotouch. The
> > > applications works fine except I'm unable to have "system" or "specialized"
> > > controls like UITabBarItems or MFMailComposeViewController localized
> > > (translated) in languages other then English. My testing device is an
> > > iphone4 and is configured to use Italian as culture. The application runs
> > > fine, but titles of UITabBarItems or the buttons of the
> > > MFMailComposeViewController still show English text. How to have them
> > > translated in Italian?
> > > 
> > 
> > 
> > Add this to your Info.plist using a text editor:
> > 
> > <key>CFBundleDevelopmentRegion</key>
> > <string>it</string>
> > 
> > Previous MonoDevelop versions used to have GUI for this setting (IIRC),
> > but I can't find it anymore. Maybe it got lost during the redesign
> > of the Info.plist editor...
> > 
> 
> 
> Ah, it can be added with the "Advanced" tab of the "iPhone Application"
> settings. Go figure ;)
> 
> Robert
> 
> 
> 
> ------------------------------
> 
> Message: 8
> Date: Wed, 7 Dec 2011 20:55:24 +0100
> From: Rene Ruppert <rene.ruppert at googlemail.com (mailto:rene.ruppert at googlemail.com)>
> Subject: [MonoTouch] Still IntPtr Constructor issues
> To: monotouch at lists.ximian.com (mailto:monotouch at lists.ximian.com)
> Message-ID: <FFA16D42-323E-4D7A-B726-42A8568DDFB2 at googlemail.com (mailto:FFA16D42-323E-4D7A-B726-42A8568DDFB2 at googlemail.com)>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Hi,
> 
> I'm still struggling with the IntPtr Constructor issue I started on SO.
> I got a bit further meanwhile.
> 
> The case is: I'm subclassing UITableViewCell and do not provide the IntPtr:ctor.
> 
> By adding the ctor and breaking in there I figured out what ObjC wants my class to do: it is calling void SetSelected ( bool selected, bool animated ).
> 
> This means "something" wants to select my cell. I looked through my code and found exactly ONE place where I call SelectRow(). I commented that out and STILL it goes through the ctor and to SetSelected().
> 
> What are my options now? Does UITableViewCell maybe always require the IntPtr ctor?
> What could possibly still select a row in a UITableView besides SelectRow()?
> 
> Ren?
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://lists.ximian.com/pipermail/monotouch/attachments/20111207/ebeef334/attachment.html 
> 
> ------------------------------
> 
> _______________________________________________
> MonoTouch mailing list
> MonoTouch at lists.ximian.com (mailto:MonoTouch at lists.ximian.com)
> http://lists.ximian.com/mailman/listinfo/monotouch
> 
> 
> End of MonoTouch Digest, Vol 29, Issue 15
> *****************************************
> 
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monotouch/attachments/20111207/b89f4481/attachment-0001.html 


More information about the MonoTouch mailing list