Re: [MonoTouch] SigSegv error in UITableViewSource GetCell after Add rows to UITableView
> GetCell Method > public override UITableViewCell GetCell (UITableView tableView, NSIndexPath > indexPath) > { > var cell = tableView.DequeueReusableCell > (cellIdentifier) as > ICTableContactCell; > var itemC = tableItems [indexPath.Row]; > if (cell == null) { > cell = new ICTableContactCell (itemC, > new NSString (cellIdentifier)); > if(cells==null){ > cells=new > List(); > } > cells.Add(cell); Why are you keeping a reference to each cell? Surely this is going to break the reusable pattern? IF you need to do this, dont use DequeueReusableCell, just make a new one each time (but I recommend you DONT do this) > } > itemC.index = indexPath.Row; > if(itemC!=null) > cell.UpdateCell (itemC); > > return cell as UITableViewCell; Pretty sure you dont need to cast on the way out. If ICTableContactCell isn't a descendant of UITableViewCell, it needs to be changed. Other than that, maybe use the dSYM to work out which line of code? Nothing obvious in there otherwise -- Nic Wise t. +64 21 676 418 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] MonoTouch.UIKit.UIStringAttributes.set_Font bug?
If you Apple-D on the DrawString method to decompile it, you'll see it's ios7 only [Since (7, 0), CompilerGenerated] public static void DrawString (this NSString This, PointF point, UIStringAttributes attributes) { This.WeakDrawString (point, attributes.Dictionary); } I suspect it's calling } Messaging.void_objc_msgSend_PointF_IntPtr (This.Handle, Selector.GetHandle ("drawAtPoint:withAttributes:"), point, attributes.Handle); } Which is iOS7 only: https://developer.apple.com/library/ios/documentation/uikit/reference/NSString_UIKit_Additions/Reference/Reference.html#//apple_ref/occ/instm/NSString/drawAtPoint:withAttributes: Availability Available in iOS 7.0 and later. On Tue, Feb 11, 2014 at 9:13 AM, Guido Van Hoecke wrote: > Guido Van Hoecke writes: > >> Guido Van Hoecke writes: >> >>> Guido Van Hoecke writes: >>> >>>> Following method crashes on iPad. >>> >>> The problem might be related to the size of the font. The same code >>> works fine on iphone, but of course uses a smaller fint there. (The game >>> draws a character in an 8x8 grid, which means cell size and thus font >>> size is much smaller on iphone) >> >> The ipad runs ois 5.1.1, the iphone runs 7.0.4 >> >> This may also be important in pinpointing the bug. > > I filed a bug report at > https://bugzilla.xamarin.com/show_bug.cgi?id=17691 > > Guido > >> >> Guido >> >>>> >>>> private void DrawChar (CGContext g, RectangleF frame, string c, >>>> StateType state) >>>> { >>>> var h = Convert.ToInt32 (frame.Height * .8); >>>> var s = new NSString (c); >>>> var size = MCiOS.TextSize (UIFont.BoldSystemFontOfSize (h), >>>> c.ToString ()); >>>> var p = new PointF (frame.X + (frame.Width - size.Width) / 2, >>>> frame.Y + (frame.Height - size.Height) / 2); >>>> var font = UIFont.BoldSystemFontOfSize(h); >>>> Debug.Assert(font != null, "Failed to get font of size " + h); >>>> s.DrawString (p, new UIStringAttributes { >>>> Font = font, >>>> ForegroundColor = _textColors [(int)state], >>>> }); >>>> } >>>> >>>> The 'Font = font' line is painted green. >>>> >>>> Initially I did not use the intermediate variable but changed the code >>>> so that I could check on the font being null. Turns out it isn't: I get >>>> {Helvetica-Bold 56}. >>>> >>>> The details of the exception seem to indicate that it really crashes >>>> inside MonoTouch: >>>> >>>> System.ArgumentNullException: Argument cannot be null. >>>> Parameter name: key >>>> at MonoTouch.Foundation.DictionaryContainer.SetNativeValue >>>> (MonoTouch.Foundation.NSString key, INativeObject value, Boolean >>>> removeNullValue) [0x0002f] in >>>> /Developer/MonoTouch/Source/maccore/src/Foundation/.pmcs-compat.DictionaryContainer.cs:343 >>>> at MonoTouch.UIKit.UIStringAttributes.set_Font (MonoTouch.UIKit.UIFont >>>> value) [0x0] in >>>> /Developer/MonoTouch/Source/monotouch/src/UIKit/.pmcs-compat.UIStringAttributes.cs:78 >>>> at XOOX.Classes.PuzzleView.DrawChar (MonoTouch.CoreGraphics.CGContext g, >>>> RectangleF frame, System.String c, StateType state) [0x000ad] in >>>> /Users/guivho/Mono/XOOX/XOOX/Classes/PuzzleView.cs:332 >>>> at XOOX.Classes.PuzzleView.DrawCell (RectangleF frame, System.String c, >>>> TrailType trail, StateType state, System.Collections.Generic.List`1 dots) >>>> [0x00066] in /Users/guivho/Mono/XOOX/XOOX/Classes/PuzzleView.cs:294 >>>> at XOOX.Classes.PuzzleView.DrawPuzzle () [0x00163] in >>>> /Users/guivho/Mono/XOOX/XOOX/Classes/PuzzleView.cs:163 >>>> at XOOX.Classes.PuzzleView.Draw (RectangleF rect) [0x2] in >>>> /Users/guivho/Mono/XOOX/XOOX/Classes/PuzzleView.cs:112 >>>> at at (wrapper managed-to-native) >>>> MonoTouch.UIKit.UIApplication:UIApplicationMain >>>> (int,string[],intptr,intptr) >>>> at MonoTouch.UIKit.UIApplication.Main (System.String[] args, >>>> System.String principalClassName, System.String delegateClassName) >>>> [0x0004c] in >>>> /Developer/MonoTouch/Source/monotouch/src/UIKit/.pmcs-compat.UIApplication.cs:38 >>>> at XOOX.Application.Main (System.String[] args) [0x8] in >>>> /Users/guivho/Mono/XOOX/XOOX/Main.cs:15 >>>> >>>> Is there some way I can prevent this error from happening? >>>> >>>> >>>> Guido >>>> >>>> -- >>>> The way I understand it, the Russians are sort of a combination of evil and >>>> incompetence... sort of like the Post Office with tanks. >>>> -- Emo Philips > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +64 21 676 418 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Major Windows Authentication Issue
Hi Xy You may need to ask on the Xamarin Forums, rather then on the mailing list - most of the activity is there. Or better yet, especially if you have a small sample you can send them, email supp...@xamarin.com Cheers Nic On Mon, Jan 20, 2014 at 1:31 AM, Xy wrote: > Hi, > > I have some code that downloads files using WebClient from a Windows > Authentication-based server for Monotouch that worked well before the iOS7 > release of Monotouch. However, now with this version of Monotouch: > > Xamarin.iOS > Version: 7.0.5.2 (Business Edition) > Branch: > Build date: 2013-02-12 20:04:08-0500 > > I get this error when downloading files: > > Exception from source mscorlib : System.IO.IOException: Too many open files > > at System.IO.FileStream..ctor (System.String path, FileMode mode, > FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, > FileOptions options) [0x0] in :0 > at System.IO.FileStream..ctor (System.String path, FileMode mode, > FileAccess access, FileShare share, Int32 bufferSize, Boolean isAsync, > Boolean anonymous) [0x0] in :0 > at System.IO.FileStream..ctor (System.String path, FileMode mode, > FileAccess access) [0x0] in :0 > > The error happens like clockwork after 236 files are downloaded from a > Windows Authentication server. The first 235 files download just fine. > > The exact same code that worked before, now does not work when paired with > the new version of the Monotouch library. I thought that perhaps it had > something to do with WebClient specifically, so I tried implementing a > non-WebClient approach using HttpWebRequest and that has the exact same > problem. As soon as I take the Windows Authentication piece out by pointing > it at a non-authenticated test server, it works fine. When I switch back to > the Windows Authentication server, it breaks. Windows Authentication is a > necessary part of this app, so I cannot switch to another authentication > method. > > I am sure this is a regression. I have confirmed that this is not an iOS7 > issue as the same problem repros in the iOS 6 simulator as the iOS 7 > simulator. Rather, it is an issue in the underlying Monotouch/Mono library > itself. The old build works just fine on iOS 7 simulator and hardware. > > Two questions: > > 1. Can I use the old version of Monotouch somehow? If so, how do I > download the DLL for the old version of System.Net, and use it side-by-side > in my app? I am now on the new version of the tools. > 2. Is this an issue you can provide guidance on how to work around, or an > ETA on a fix? > > Thanks, > > > > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/Major-Windows-Authentication-Issue-tp4658528.html > Sent from the MonoTouch mailing list archive at Nabble.com. > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +64 21 676 418 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Slide down menu
Hi This should answer that: http://fastchicken.co.nz/2013/07/18/ma2-the-quick-bar/ I use a toolbar, but you could put any view in there, and just animate it down. Cheers Nic On Mon, Jan 6, 2014 at 11:05 AM, Alejandro Vazquez wrote: > Hi, > > Im trying to create the slide down menu that Dropbox app has implemented > without any success. > > Any clue on how to do something similar? > > Here is the image just in case: http://i43.tinypic.com/2hxt1d3.png > > Thanks a lot and appreciate it > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +64 21 676 418 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] How do you actually listen to an UIScrollView scrolling
As far as I know, you dont. X.iOS has alway followed the following model: 1. you make a new object (UIScrollView on your case). It makes its own UIScrollViewDelegate in the background, which calls the .Scrolled events (and all the others) 2. you assign the delegate. This clears (or rather, replaces) any events. They are still there, they just dont ever get called. I don't think there is a way to go back from 2 to 1. Or a way to detect which one you are in. Maybe check to see if .delegate is null (or a specific class?) which would mean you are using the event model? On Fri, Jan 3, 2014 at 4:52 AM, victoria wrote: > Hi! > > I'm working with someone developing a pretty neat component, that might be > submitted to the Xamarin component store later (or not, it's not entirely up > to me). Without going into specifics, the end user will implement the > component together with an existing UIScrollView, where it will listen to > its scroll event. That's easy enough right? Well, not quite. > > In a perfect world the component would work like this: > > var target = new SomeUIScrollView(); > var component = new Component(target); > > and in the constructor we'd simply do > > target.Scrolled += magic(this, EventArgs.Empty); > > > However... the above doesn't work if the UIScrollView is using an > UIScrollViewDelegate. So, next idea was to do > > class Component : UIScrollViewDelegate > { > public override void Scrolled(UIScrollView scrollView) > { > magic(this, EventArgs.Empty); > } >... > > and then the user would have to use or inherit from Component as their > UIScrollViewDelegate and make sure to call the base methods if they > themselves would override Scrolled. > > However... the above doesn't work if the user is using the event syntax. > > > Question: As a third party library, how do you support both methods? If it's > not possible, should we go with the event syntax (which feels very .NET) or > instead implement it as an UIScrollViewDelegate (which feels more iOS)? > > / V > > > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/How-do-you-actually-listen-to-an-UIScrollView-scrolling-tp4658518.html > Sent from the MonoTouch mailing list archive at Nabble.com. > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +64 21 676 418 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] GUI templates
You may need to look on the forums, and also on the component store - I think there is a template there which you could model off. The APIs you need are called UIAppearance - Xamarin have good docs for that on their site. On Tue, Nov 12, 2013 at 6:37 PM, krisha wrote: > hi nic, > >i want to use custom psd templates into monotouch project but > didnt found appropiate tuotorial on how to use it. can you provide me some > help regarding this please its urgent!!! > > Thank you > > > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/GUI-templates-tp4641104p4658513.html > Sent from the MonoTouch mailing list archive at Nabble.com. > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +64 21 676 418 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Looking for Senior .NET Workflow Developer / Architect w/Monotouch
Sure, I guess. But you also might get better results from the Xamarin forums. On Mon, Nov 4, 2013 at 4:07 AM, Linda (Clover) < li...@cloverbusinesssolutions.com> wrote: > Would I be able to post a contract to hire position I need to fill to the > group? > > > > Regards, > > > > Linda > > Clover Business Solutions > > 201.254.3004 (direct dial) > > 201.335.0404 (NJ) > > 917.472.1699 (NYC) > > 408.849.4600 (Bay area) > > 312.791.9645 (Chicago) > > 919.926.9260 (Raleigh/Durham) > > [image: Clover logo] > > Clover Web site <http://www.cloverbusinesssolutions.com/> > > Follow on Twitter <https://twitter.com/clover_contact> > > > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > > -- Nic Wise t. +64 21 676 418 | @fastchicken b. http://www.fastchicken.co.nz/ <>___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Questions about supporting both iOS 6 and 7
> - I set the iOS Build > SDK version to 7, but then my app would not launch > in the iOS 6.0 simulator. Is it possible to get this to work? It should not, no. ( I think there is an issue with Mavericks with the iOS6 sim, if you are running it. Run the OSX Console app, which should tell you why it's not working.) You need to set the SDK version to "Default", but make sure that "iOS Application" => Deployment target is set to 6.0. (or 6.1) > - Otherwise If I set SDK version to be 6.0, is it still possible to get iOS > 7 look and feel in iOS 7? No, I think you need to use the 7 SDK to get the 7 look. Plus, I dont think Apple accepts 6.0 SDK apps anymore (they never did in the past) > - If using SDK v6, can I still use iOS 7 UIKit properties? Only be calling the selector directly. So no C# bindings > - If I release iOS 7 only update to app store, will users still be able to > download my app for iOS 6? Nope. However, if you have v1.0 as an iOS6 app, and v2.0 as iOS7 only, then iOS6 people will be offered the 1.0 version. In the past, I've used the 6 SDK and set the deployment target to 4.3, so I could target the iPhone 3G. But you also have to be careful not to call iOS6 methods :) > > Thanks, > XY > > > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/Questions-about-supporting-both-iOS-6-and-7-tp4658509.html > Sent from the MonoTouch mailing list archive at Nabble.com. > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +64 21 676 418 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] UIColor to NSString and Back
I've been using this https://gist.github.com/nicwise/6617756 to do this: public static UIColor HeaderDark = "1D354E".ToUIColor(); (same as a web hex colour). However, it doesn't deal with alpha, which would be easy to add. Going the other way should be easy On 18 September 2013 11:41, Andreas Ploetzeneder wrote: > Hi, > how can i convert a UIColor into a string and back again? > > Best regards > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Bluetooth portable printer
Oh, and is just happened to drop into my rss reader this morning http://corner.squareup.com/2013/08/bluetooth-printing.html -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ On 2 Sep 2013, at 17:10, Alejandro Vazquez wrote: Thanks Nice, So is it possible to use Airprint for the epson mobilink printer? -- *From:* Nic Wise *To:* Alejandro Vazquez *Cc:* "monotouch@lists.ximian.com" *Sent:* Monday, September 2, 2013 10:56 AM *Subject:* Re: [MonoTouch] Bluetooth portable printer You have a number of ways if its on a local network, you can just use a airprint printer (or something running on a mac which makes any local printer look like an airprint one), and then just do the normal printing (look at the apple or Xamarin docs), eg: http://docs.xamarin.com/samples/RecipesAndPrinting If it has to be 100% mobile - eg a receipt printer attached to a person, walking around - you need bluetooth, and I suspect you are going to be using something like this: https://pos.epson.com/products/MobilinkP60withBluetooth?ProductPK=679 https://pos.epson.com/developers/application-process.htm Printing without using AirPrint is still a bit messy, it appears. On 2 September 2013 15:38, Alejandro Vazquez wrote: > Hi, > > I need to make an app using Monotouch in order to print receipts from the > app. Does anyone can recommend me a printer and how can I hook it up using > monotouch? > > Thanks a lot, > > Alejandro > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Bluetooth portable printer
Not from what I read on their site, no http://pos.epson.com/mobile/ you have to get their SDK, then get them to certify you (and apple to) as a "made for iphone" app or something. https://pos.epson.com/products/MobilinkP60withBluetooth?ProductPK=679 https://pos.epson.com/developers/application-process.htm Then, I think you can. You might not need that if you are not going into the appstore tho. On 2 September 2013 17:10, Alejandro Vazquez wrote: > Thanks Nice, > > So is it possible to use Airprint for the epson mobilink printer? > > > > ________ > From: Nic Wise > To: Alejandro Vazquez > Cc: "monotouch@lists.ximian.com" > Sent: Monday, September 2, 2013 10:56 AM > Subject: Re: [MonoTouch] Bluetooth portable printer > > You have a number of ways > > if its on a local network, you can just use a airprint printer (or > something running on a mac which makes any local printer look like an > airprint one), and then just do the normal printing (look at the apple > or Xamarin docs), eg: > http://docs.xamarin.com/samples/RecipesAndPrinting > > If it has to be 100% mobile - eg a receipt printer attached to a > person, walking around - you need bluetooth, and I suspect you are > going to be using something like this: > > https://pos.epson.com/products/MobilinkP60withBluetooth?ProductPK=679 > https://pos.epson.com/developers/application-process.htm > > Printing without using AirPrint is still a bit messy, it appears. > > > > > On 2 September 2013 15:38, Alejandro Vazquez wrote: >> Hi, >> >> I need to make an app using Monotouch in order to print receipts from the >> app. Does anyone can recommend me a printer and how can I hook it up using >> monotouch? >> >> Thanks a lot, >> >> Alejandro >> >> ___ >> MonoTouch mailing list >> MonoTouch@lists.ximian.com >> http://lists.ximian.com/mailman/listinfo/monotouch >> > > > > -- > Nic Wise > t. +44 7788 592 806 | @fastchicken > b. http://www.fastchicken.co.nz/ > > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Bluetooth portable printer
You have a number of ways if its on a local network, you can just use a airprint printer (or something running on a mac which makes any local printer look like an airprint one), and then just do the normal printing (look at the apple or Xamarin docs), eg: http://docs.xamarin.com/samples/RecipesAndPrinting If it has to be 100% mobile - eg a receipt printer attached to a person, walking around - you need bluetooth, and I suspect you are going to be using something like this: https://pos.epson.com/products/MobilinkP60withBluetooth?ProductPK=679 https://pos.epson.com/developers/application-process.htm Printing without using AirPrint is still a bit messy, it appears. On 2 September 2013 15:38, Alejandro Vazquez wrote: > Hi, > > I need to make an app using Monotouch in order to print receipts from the > app. Does anyone can recommend me a printer and how can I hook it up using > monotouch? > > Thanks a lot, > > Alejandro > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Hosting database server or services in iOS
And as Mike pointed out, use HttpListener (in the comments :) ) On 27 August 2013 17:27, Craig Dunn wrote: > Here's a pretty old (2009) sample from Mike doing some basic > listening/response from iOS > > http://mikebluestein.wordpress.com/2009/10/13/create-a-mini-web-server-using-monotouch-to-serve-up-a-silverlight-app-to-your-desktop/ > > HTH > > > > > On Tue, Aug 27, 2013 at 8:42 AM, Nic Wise wrote: >> >> BTW, thinking about it, you can run a HTTP or FTP Server on iOS, tho >> you app must be in the foreground. ewallet and airforms >> (http://polarbearfarm.com/airforms/) both do it. They are done in >> ObjC, but there is no reason not to be able to do it in Xam.iOS. >> >> On 27 August 2013 16:41, Nic Wise wrote: >> > You might need to read around. I think you can create a HTTP server on >> > iOS (ie, listen to a socket and do something), and it might be built >> > in to .NET / Mono too. >> > >> > However, if the app isn't the front up (eg someone switches out to >> > safari for a short period) then it gets shut down - no background >> > processes. Possibly the same if the power button gets hit by accident. >> > >> > As I said in the last one, I'd go for json over http, as it's _easy_, >> > and quite quick. Personally, I think I'd go for a Mac Mini or similar >> > (maybe even a Raspberry PI or something _tiny_, depending on how much >> > control you have over the client setup), and have that as the host. >> > Then you can do whatever you want without having to work around iOS >> > limitations. >> > >> > iOS7 may change that a bit, but I'm not sure I'd build a business on it >> > :) >> > >> > Also think about what happens if the server disappears, or if the >> > network goes down (as they do) >> > >> > >> > >> > On 27 August 2013 09:24, hocp...@yahoo.com wrote: >> >> Hello, I've developed a Point of Sales (POS) app on the iPad and >> >> iPhone. The >> >> app used local SQLite database to store data. The app mainly operates >> >> in a >> >> single store (close loop) environment with local network router. But in >> >> this >> >> environment I need to be able to run several iPad(s) connecting >> >> together in >> >> a single database. I want one iPad at the cashier counter to host the >> >> database and the rest of the iPad devices connecting to the host. In >> >> the POS >> >> environment all app needs to be responsive in real-time or close to >> >> real-time data access, because there a lot data transfers between them. >> >> I >> >> think Core Data, web service, MS Azure, etc. is not going be responsive >> >> enough. Nor having a local desktop Windows server to provide local data >> >> access will NOT cut it because we want the store owner to be able to >> >> bring >> >> the host iPad home after closing the shop. >> >> >> >> Questions: 1. Can I develop the app to host local database? 2. What is >> >> the >> >> best network protocol for the host? Socket, REST, JASON, WCF >> >> >> >> -Thanks Andrew Pham >> >> >> >> >> >> >> >> -- >> >> View this message in context: >> >> http://monotouch.2284126.n4.nabble.com/Hosting-database-server-or-services-in-iOS-tp4658440.html >> >> Sent from the MonoTouch mailing list archive at Nabble.com. >> >> ___ >> >> MonoTouch mailing list >> >> MonoTouch@lists.ximian.com >> >> http://lists.ximian.com/mailman/listinfo/monotouch >> > >> > >> > >> > -- >> > Nic Wise >> > t. +44 7788 592 806 | @fastchicken >> > b. http://www.fastchicken.co.nz/ >> >> >> >> -- >> Nic Wise >> t. +44 7788 592 806 | @fastchicken >> b. http://www.fastchicken.co.nz/ >> ___ >> MonoTouch mailing list >> MonoTouch@lists.ximian.com >> http://lists.ximian.com/mailman/listinfo/monotouch > > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Socket Server
Hi I replied to the 2 questions in your other emails :) Cheers Nic > 1. Hosting database server in iOS > > I've developed a Point of Sales (POS) app on the iPad and iPhone. The app > builds with local SQLite database. The app mainly operates in a single store > (close loop) environment with local network router. But in this environment > I need to be able to run several iPad(s) connecting together in a single > database. I want one iPad at the cashier counter to host the database and > the rest of other iPad devices connecting to the host. In the POS > environment, all app needs to be responsive in real-time or close to > real-time database access, because there a lot data transfers between them. > I think Core Data, web service, MS Azure, etc. is not going be responsive > enough. Nor having a local desktop Windows server to provide local data > access will NOT cut it because we want the store owner to be able to bring > the host iPad home after closing the shop. > > Questions: 1. Can I develop the app to host local database? 2. What is the > best network protocol for the host? Socket, REST, JASON, WCF > > > > 2. Web Services Performance > > Again, I've developed the Point of Sales (POS) application in Windows and > iPad (iOS devices) app using local database such as MSSQL Server Express and > Sqlite3. These applications work great and FAST in local network > environment. For multi stations I used MSSSQL network server (TCP open port > 1433). For SQLite system, I've wrote a complete WCF server/client then > hosted on local network. Again, the systems work great and FAST. Now I want > explore Web base application which mean that I must hosting web services on > the WWW or Cloud services. > > So, my question is what web service protocol should I use to maintaining > the satisfactory POS performance (the applications still have run locally as > native app). I have looks in to JSON, REST protocol but not sure will give > the performance that I need because in POS world it is requires that fast > and a lot database records to SELECT(GET), UPDATE(POST) and INSERT(PUT) in > real-time or close manner. > > I know that I can't get a real-time performance on web services but if I > can get 80% plus performance that worth shooting for. Thanks... > > > Visit our website: http://www.yesmua.com > > > > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/Socket-Server-tp3726258p4658439.html > Sent from the MonoTouch mailing list archive at Nabble.com. > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Hosting database server or services in iOS
BTW, thinking about it, you can run a HTTP or FTP Server on iOS, tho you app must be in the foreground. ewallet and airforms (http://polarbearfarm.com/airforms/) both do it. They are done in ObjC, but there is no reason not to be able to do it in Xam.iOS. On 27 August 2013 16:41, Nic Wise wrote: > You might need to read around. I think you can create a HTTP server on > iOS (ie, listen to a socket and do something), and it might be built > in to .NET / Mono too. > > However, if the app isn't the front up (eg someone switches out to > safari for a short period) then it gets shut down - no background > processes. Possibly the same if the power button gets hit by accident. > > As I said in the last one, I'd go for json over http, as it's _easy_, > and quite quick. Personally, I think I'd go for a Mac Mini or similar > (maybe even a Raspberry PI or something _tiny_, depending on how much > control you have over the client setup), and have that as the host. > Then you can do whatever you want without having to work around iOS > limitations. > > iOS7 may change that a bit, but I'm not sure I'd build a business on it :) > > Also think about what happens if the server disappears, or if the > network goes down (as they do) > > > > On 27 August 2013 09:24, hocp...@yahoo.com wrote: >> Hello, I've developed a Point of Sales (POS) app on the iPad and iPhone. The >> app used local SQLite database to store data. The app mainly operates in a >> single store (close loop) environment with local network router. But in this >> environment I need to be able to run several iPad(s) connecting together in >> a single database. I want one iPad at the cashier counter to host the >> database and the rest of the iPad devices connecting to the host. In the POS >> environment all app needs to be responsive in real-time or close to >> real-time data access, because there a lot data transfers between them. I >> think Core Data, web service, MS Azure, etc. is not going be responsive >> enough. Nor having a local desktop Windows server to provide local data >> access will NOT cut it because we want the store owner to be able to bring >> the host iPad home after closing the shop. >> >> Questions: 1. Can I develop the app to host local database? 2. What is the >> best network protocol for the host? Socket, REST, JASON, WCF >> >> -Thanks Andrew Pham >> >> >> >> -- >> View this message in context: >> http://monotouch.2284126.n4.nabble.com/Hosting-database-server-or-services-in-iOS-tp4658440.html >> Sent from the MonoTouch mailing list archive at Nabble.com. >> _______ >> MonoTouch mailing list >> MonoTouch@lists.ximian.com >> http://lists.ximian.com/mailman/listinfo/monotouch > > > > -- > Nic Wise > t. +44 7788 592 806 | @fastchicken > b. http://www.fastchicken.co.nz/ -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Hosting database server or services in iOS
You might need to read around. I think you can create a HTTP server on iOS (ie, listen to a socket and do something), and it might be built in to .NET / Mono too. However, if the app isn't the front up (eg someone switches out to safari for a short period) then it gets shut down - no background processes. Possibly the same if the power button gets hit by accident. As I said in the last one, I'd go for json over http, as it's _easy_, and quite quick. Personally, I think I'd go for a Mac Mini or similar (maybe even a Raspberry PI or something _tiny_, depending on how much control you have over the client setup), and have that as the host. Then you can do whatever you want without having to work around iOS limitations. iOS7 may change that a bit, but I'm not sure I'd build a business on it :) Also think about what happens if the server disappears, or if the network goes down (as they do) On 27 August 2013 09:24, hocp...@yahoo.com wrote: > Hello, I've developed a Point of Sales (POS) app on the iPad and iPhone. The > app used local SQLite database to store data. The app mainly operates in a > single store (close loop) environment with local network router. But in this > environment I need to be able to run several iPad(s) connecting together in > a single database. I want one iPad at the cashier counter to host the > database and the rest of the iPad devices connecting to the host. In the POS > environment all app needs to be responsive in real-time or close to > real-time data access, because there a lot data transfers between them. I > think Core Data, web service, MS Azure, etc. is not going be responsive > enough. Nor having a local desktop Windows server to provide local data > access will NOT cut it because we want the store owner to be able to bring > the host iPad home after closing the shop. > > Questions: 1. Can I develop the app to host local database? 2. What is the > best network protocol for the host? Socket, REST, JASON, WCF > > -Thanks Andrew Pham > > > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/Hosting-database-server-or-services-in-iOS-tp4658440.html > Sent from the MonoTouch mailing list archive at Nabble.com. > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Web Services Performance for Point of Sales application.
The overhead of using Json over HTTP vrs pretty much anything else (binary over sockets etc) is going to be negated by the speed of the internet - or lack of it. The round trip from your POS to the server is going to be <1ms on a local network, and possibly 10-100ms (or more if it's 3G/4G - 2-5s sometimes) for an internet call. What kind of data are you moving over this connection? How many requests per "person buying something"? Why does it have to be realtime/near realtime? what happens if the network connection goes away? Personally, I'd explore json over HTTPS ('cos you need it to be secure, right?), with gzip compression on the server end (which is common now anyway) but avoid WCF like the plague. Look at using ServiceStack or something similar. SignalR might also be an option if you need to do bidirectional comms. Sending 1k as json (which might end up as 1.5k) or binary (which might be 1.01k) is nothing compared to creating a connection to the server in the first place. On 27 August 2013 09:30, hocp...@yahoo.com wrote: > Hello, I've developed the Point of Sales (POS) application in Windows and > iPad (iOS devices) app using local database such as MSSQL Server Express and > Sqlite3. These applications work great and FAST in local network > environment. For multi stations I used MSSSQL network server (TCP open port > 1433). For SQLite system, I've wrote a complete WCF server/client then > hosted on local network. Again, the systems work great and FAST. Now I want > explore Web base application which mean that I must hosting web services on > the WWW or Cloud services. > > So, my question is what web service protocol should I use to maintaining the > satisfactory POS performance (the applications still have run locally as > native app). I have looks in to JSON, REST protocol but not sure will give > the performance that I need because in POS world which requires that fast > database access to SELECT(GET), UPDATE(POST) and INSERT(PUT) in real-time or > close to real-time. > > I know that I can't get a real-time performance on web services but if I > can get 80% plus performance that worth shooting for. Thanks... > > > Visit our website: http://www.yesmua.com > > > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/Web-Services-Performance-for-Point-of-Sales-application-tp4658441.html > Sent from the MonoTouch mailing list archive at Nabble.com. > _______ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] IPad Vertical TabBar (uitableview)
Hi I just thought, a demo I did for Xamarin Evolve would do this, too. I was just using Clancey's flyoutcontroller, but if you kept it "out", you get the same result (rather than letting it close over) https://github.com/nicwise/EvolveMonoTouchDialog/tree/master/5-styling https://github.com/nicwise/EvolveMonoTouchDialog/blob/master/5-styling/AppDelegate.cs Should get you about 95% of the way there. N On 15 July 2013 01:36, Alejandro Vazquez wrote: > Thanks a lot Nic, > > Will try and let you know my progress on that. Agree with you, the > inteface is very nice :) > > Appreciate your advise! Have a nice afternoon. > > Alejandro > > -- > *From:* Nic Wise > *To:* Alejandro Vazquez > *Cc:* "monotouch@lists.ximian.com" > *Sent:* Sunday, July 14, 2013 4:01 PM > *Subject:* Re: [MonoTouch] IPad Vertical TabBar (uitableview) > > There are 3 classes here, which you could port over to C# > > https://github.com/futuresimple/FSVerticalTabBarController/tree/master/src > > Knowing enough ObjC to port them over is a very useful thing :) > > (If you don't / can't, I may try - tho I'm not sure WHEN! But I love that > interface style) > > > > On 14 July 2013 14:49, Alejandro Vazquez wrote: > > Hi, > > I want to create an iPad left menu like the link below: > > > https://github.com/futuresimple/FSVerticalTabBarController/raw/master/images/sample_screenshot.png > > I found the control is already created but its on xcode: > https://github.com/futuresimple/FSVerticalTabBarController > > I would like to know how can I port this protect to Monotouch? > > Appreciate any help. > > Sent from Yahoo! Mail for iPad > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > > > > > -- > Nic Wise > t. +44 7788 592 806 | @fastchicken > b. http://www.fastchicken.co.nz/ > > > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] IPad Vertical TabBar (uitableview)
There are 3 classes here, which you could port over to C# https://github.com/futuresimple/FSVerticalTabBarController/tree/master/src Knowing enough ObjC to port them over is a very useful thing :) (If you don't / can't, I may try - tho I'm not sure WHEN! But I love that interface style) On 14 July 2013 14:49, Alejandro Vazquez wrote: > Hi, > > I want to create an iPad left menu like the link below: > > > https://github.com/futuresimple/FSVerticalTabBarController/raw/master/images/sample_screenshot.png > > I found the control is already created but its on xcode: > https://github.com/futuresimple/FSVerticalTabBarController > > I would like to know how can I port this protect to Monotouch? > > Appreciate any help. > > Sent from Yahoo! Mail for iPad > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Excel Library
I've used this on the full framework, but not on X.iOS http://epplus.codeplex.com/ Worked well :) On 12 July 2013 15:52, Juan M Gómez wrote: > Hi, > I need to parse some data from an excel, so I'm wondering if somebody > knows a library that allows at least reading access. > > cheers > > Juan M Gómez > *Contractor Software Engineer* > juamangom...@gmail.com > www.jmgomez.me <http://jmgomez.me> > >[image: twitter] <http://twitter.com/_jmgomez_> [image: > linkedIn]<http://es.linkedin.com/in/juamangomalv> > > > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Adding strings at runtime
I've been playing with Vernacular on the weekend (which worked quite well for what I wanted) Maybe you could either change the default iOS one to look somewhere else (it uses the built in iOS .lproj/strings technique, which is part of the bundle and hence read only), or write a new catalog, and have it load from somewhere where you download it from? In the end, you are still calling Catalog.GetString("somekey") all over the place... (ie, "go and work out the language I'm using, and find the transaction of "somekey") Vernacular just helps you get all the strings _out_, and pluralize / genderize them. BTW, lets assume I (as a user) add "fuzzwubble" to your app. Someone else uses it in German, and it needs to be "derfuzzenwubbleen". a) how does this new word get to you to be translated? b) how do you get the translation back? Are you doing it and putting it on a web server somewhere? c) what do you do if there is no translation yet (I assume display english? Use google translate?) d) thought about crazy long words (esp German)? Right to left? etc? On 3 June 2013 12:56, Paul Johnson wrote: > Hi, > > The current app I'm developing requires the use of a translation service for > phrases that are user defined and therefore unable to be placed into the > translation files. > > I've found this link on stackoverflow which says it can sort of be done > > http://stackoverflow.com/questions/6075158/can-strings-resource-files-be-added-at-runtime > > but makes reference to genstrings. With monotouch, is genstrings available > for use once the app has been deployed and if it is, would I need to use > something like System.Environment to run the utility? > > I'm not sure if it would be a simpler way to have a secondary localization > file (plain text file generated in app) and read from that on runtime. > > Any advice on this would be appreciated. > > Thanks > > Paul > -- > "Space," it says, "is big. Really big. You just won't believe how vastly, > hugely, mindbogglingly big it is. I mean, you may think it's a long way down > the road to the chemist's, but that's just peanuts to space, listen..." > Hitch Hikers Guide to the Galaxy, a truly remarkable book! > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] app crashs directly after start
Deploy it to a device, then open xcode (organiser) and look at the logs there for the device, that will tell you whats going on. I'd suspect keys, which is usually the problem. I think the simulator logs to the normal Mac console (console.app) On 1 June 2013 13:04, Andreas Ploetzeneder wrote: > Hello, > when starting a compiled Application on the device it crashes before > starting the Default Screen. > But the app crashs before starting the debugging. > > How can i find out the reason? > > > public override bool FinishedLaunching (UIApplication app, > NSDictionary options) > { > System.Diagnostics.Debug.WriteLine("Start"); > > is not beeing written ! > > So directly after the default.png i see the crash... > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Open a camera programatically in ipad
Try some of these: http://docs.xamarin.com/recipes/ios/media/images http://docs.xamarin.com/recipes/ios/media/video_and_photos http://docs.xamarin.com/samples/ios/Media http://docs.xamarin.com/guides/ios/application_fundamentals/working_with_images and if you need it cross platform (even if you don't, it's a nice API to use) http://xamarin.com/mobile On 27 May 2013 06:03, Madhu Sudhan wrote: > How to open a camera in ipad and also how to crop the captured image > Programatically. > > > Waiting for the valuable Answers.Thanks in Advance. > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Importing a view from outside of a xib & "tooltips"
> In the Xcode designer there is a widget called "External Objects" which > looks to be a placeholder for views created outside of the xib file being > worked on. Ah, ok. I suspect it's just a named UIView, and you can then add things into it.. > > Yep! Thanks :) -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Importing a view from outside of a xib & "tooltips"
What do you mean by "external objects"? You could do a tooltip when the user enters a field ("when it becomes the first responder"). You can work out easily the bounds of the text box, then just make a new UIView (which has the stuff in it you want to display), add it into the same view that contains the textbox, and position it in the right place. You can also bring it to the front to make sure it shows over the top of everything else. Is that what you mean? On 24 May 2013 02:49, Paul Johnson wrote: > Hi, > > As always, there is a tonne of advice on how to bring an external object > into the current view in ObjC, but nothing much for .NET > > Does anyone know if there is a simple to follow method of building up a view > using external objects around that I may learn from? > > Another UI bit I can't find much on is how to make "tool tips" (help > messages when you don't actually press on a button, but are in contact with > the screen). Can these be done in monotouch? > > Thanks > > Paul > -- > "Space," it says, "is big. Really big. You just won't believe how vastly, > hugely, mindbogglingly big it is. I mean, you may think it's a long way down > the road to the chemist's, but that's just peanuts to space, listen..." > Hitch Hikers Guide to the Galaxy, a truly remarkable book! > > _______ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Button with an image and text
Can you not set the title of the button? btn.SetTitle("", UIControlState.Normal): Failing that, I'd make a new UIView child, and add the button (with image) and a label to it. MAke the frame the same for everything, and if you need to, bring the label to the front. then just work with the UIView. On 15 May 2013 02:45, Paul Johnson wrote: > Hi, > > I have a series of buttons with images on them. This is simple enough to do > (btnFoo.SetImage(UIImage.FromFile("..."), UIControlState.Normal);) > > What I would like though is something like this > > +--+ > | | > | image | > | | > | some text | > | | > +--+ > > Am I better off adding two child views to the button (one for the image and > one for the text) or is there a simple "all-in-one" method to do this? > > Paul > -- > "Space," it says, "is big. Really big. You just won't believe how vastly, > hugely, mindbogglingly big it is. I mean, you may think it's a long way down > the road to the chemist's, but that's just peanuts to space, listen..." > Hitch Hikers Guide to the Galaxy, a truly remarkable book! > > _______ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] PDF Merging
http://pspdfkit.com/ is usually the go to lib for this. you might be able to do it with the built in stuff... you can open and write to PDFs, so it should be possible On 16 May 2013 04:49, Matronix wrote: > Looking for a library to use to merge pdfs inside of my app. Or is there a > built in way to do this? > > > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/PDF-Merging-tp4658310.html > Sent from the MonoTouch mailing list archive at Nabble.com. > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Expand and Collapse UITableView Section
Are you using MonoTouch.Dialog, or normal UITableView stuff? if it's the latter, I suggest you spend 5 mins and learn a small amount of objc. The code in that SO post is... well, REALLY basic. eg - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { if (indexPath.row == 0) { ///it's the first row of any section so it would be your custom section header ///put in your code to toggle your boolean value here mybooleans[indexPath.section] = !mybooleans[indexPath.section]; ///reload this section [self.tableView reloadSections:[NSIndexSet indexSetWithIndex:indexPath.section] withRowAnimation:UITableViewRowAnimationFade]; } } (sorry, the formatting is going to be out) In your UITableViewSource derived class public override void RowSelected (UITableView tableView, NSIndexPath indexPath) { if (indexPath.Row == 0) { //change the state of the row that was tapped mybooleans[indexPath.Section] = !mybooleans[indexPath.Section]; //when you reload all the sections, they will look at the mybooleans list to work out if they need to show themselves expanded or not tableView.ReloadSections(NSIndexSet.FromIndex(indexPath.Section), UITableViewRowAnimation.Fade); } } They are doing it differently - there is no ACTUAL header, they just have a normal cell as the first item, and that one is the "header" (rather than using the built in header) - then you can tap it, and it expands or contracts. You could do that with a normal header, by putting views into it and hooking something off them, but I think this might be easier. That said, this method would not keep the header at the top when you are scrolling within a a section - it would scroll off the top like normal. On 13 May 2013 12:15, krisha wrote: > and sample Link is > :http://stackoverflow.com/questions/1938921/expand-collapse-section-in-uitableview > > > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/Expand-and-Collapse-UITableView-Section-tp4658301p4658303.html > Sent from the MonoTouch mailing list archive at Nabble.com. > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Any ideas on where to look for this?
Paul If you are using xib's, have a google around for "this class is not key value coding-compliant for the key" - there are lots of posts on stackoverflow covering this. eg http://stackoverflow.com/questions/3088059/this-class-is-not-key-value-coding-compliant-for-the-key or specific to monotouch: http://stackoverflow.com/questions/1257/not-key-value-coding-compliant-monotouch-and-ios-6 Drop an email back if these make no sense. Cheers N On 11 May 2013 00:27, Paul Johnson wrote: > Hi, > > I'm building my app and while it compiles, when it's deployed to the > simulator the splash screen shows, but it quickly replaced by this > > Unhandled Exception: > MonoTouch.Foundation.MonoTouchException: Objective-C exception thrown. Name: > NSUnknownKeyException Reason: [ > setValue:forUndefinedKey:]: this class is not key value coding-compliant for > the key Animals. > at (wrapper managed-to-native) > MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr) > at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String > principalClassName, System.String delegateClassName) [0x0004c] in > /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38 > at ftrack2ios.Application.Main (System.String[] args) [0x1] in > /Volumes/Developer/Developer/new > ftrack/iOS/ftrack2-ios/ftrack2-ios/Main.cs:16 > > The only place I have Animals listed is in the Localizable.strings file - > it's not in any of the xib files. > > Thanks > > Paul > -- > "Space," it says, "is big. Really big. You just won't believe how vastly, > hugely, mindbogglingly big it is. I mean, you may think it's a long way down > the road to the chemist's, but that's just peanuts to space, listen..." > Hitch Hikers Guide to the Galaxy, a truly remarkable book! > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] How to show a wait cursor until process is running
the one up by the name of the carrier is using UIApplication.SharedApplication.NetworkActivityIndicatorVisible = (true or false); eg private static int networkActivityCounter = 0; public static void TurnOnNetworkActivity() { if (networkActivityCounter == 0) { UIApplication.SharedApplication.NetworkActivityIndicatorVisible = true; } networkActivityCounter ++; } public static void TurnOffNetworkActivity() { networkActivityCounter--; if (networkActivityCounter <= 0) { networkActivityCounter = 0; UIApplication.SharedApplication.NetworkActivityIndicatorVisible = false; } } (so you can call it more than once, and it'll turn off after you turn it off the right number of times) If you want something more obvious to the user, try this: https://components.xamarin.com/view/btprogresshud/ On 11 May 2013 07:04, madhusudhan reddy wrote: > How to show a wait cursor until process is running. > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] View on top of tabbar navigation
After you assign the window's RootViewController (which might be being done via the storyboard), you could then use window.RootViewController.PresentViewController(...) to throw up a view over the top? Could you segue to another view in your storyboard, based on if the user is logged in or not? On 7 May 2013 11:28, Morten Kruse wrote: > > Hi, > > > > I'm creating a new app where the user has to login before using it. > > > > I'm using storyboard and tabbar navigation. > > > > When The app starts up I want to check if the user is logged in. If not > logged in I will push a view onto the screen hiding the tabbar navigation. > > When the user is logged in the view should slide away again. > > > > How i do this? > > > > Br morten > > > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Issue with app publishing(refused because of private api usage _NDGetEnviron)
> It might be a typo but... NDGetEnviron (the symbol mentioned earlier) != > NSGetEnviron (the symbol mentioned in unity thread) > > In any case NSGetEnviron is not a symbol used by Xamarin.iOS (e.g. for > Environment.*). So it's coming from somewhere else and need to be found. It wasn't a typo - it was just a screw up on my part. I googled for "_NDGetEnviron", but google returns _NSGetEnviron The only other occurance of _NDGetEnviron is... this thread. Nearly GoogleWhacked! As to if Kosta mistyped it in the first place, I dont know :) -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Issue with app publishing(refused because of private api usage _NDGetEnviron)
According to the Unity docs (they use Mono, too) http://forum.unity3d.com/threads/54355-_NSGetEnviron-App-Rejected-Version-3-0 "_NSGetEnviron is used by the Mono runtime to provide an implementation of the .NET core API method: Environment.GetEnvironmentVariable()." "In order for us to solve this problem we simply removed any calls to _NSGetEnviron and exc_server. Update Unity iPhone 1.5.1 was sent out to developers days ago. Most of them have already resubmitted their Apps to the AppStore with the functions removed. Unity iPhone 1.5.1 will go live this week." --posted November 2009 I would venture a guess that you built your app with something earlier than unity 1.5.1. Is this the case? If so, perhaps you should rebuild with Unity 1.7 and resubmit. -- which version of Xamarin.iOS are you using, 'cos that post is nearly 3 years old? I assume you are calling Environment.GetEnvironmentVariable somewhere? MAybe it's been fixed in a newer version of Xam.iOS? Sebastien (or Rolf) is the right person to fix it tho, as far as I know. N On 2 May 2013 11:15, Kosta Mihajlov wrote: > Except for the native bindings, the only external library we are using it > Newtonsoft.json(portable) > Our shared code is in a form of a portable libraries. is there a chance for > Newtonsoft.json to be the problematic one? > Thanks, >Costa > > Thanks, >Costa > > On May 1, 2013, at 2:03 PM, Sebastien Pouliot wrote: > > On Wed, May 1, 2013 at 5:24 AM, Kosta Mihajlov wrote: >> >> >> Hi All, >> We have an issue with publishing our IOS app/s on the store >> we are using the Application Builder to submit the ipa/s. >> the result returned is : >> The App references non-public symbols in >> Payload/MediawirePrintStandMobilePresentationMonoTouch.app/PrintStand: >> _NDGetEnviron > > This is not a symbol that comes from Xamarin.iOS. It likley comes from a > static library you're linking your application against. > >> >> I made a few searches and it seemed to me that if i set the solution to >> Link SDK Assemblies(currently we don't link anything) it will work: > > > Link SDK is the default and there are several reasons for this. I'll give > you a link to my Evolve talk as soon as it's published. > >> >> This popped up another bug: >> 2. Due to the fact that we are using: >> --compiler:clang++ additional arguments >>the build fails when Link SDK Assemblies only or Link All >> assemblies is set. > > That's surprising. Managed linking happens before native compilation. Can > you file a bug report[1] with the details ? including the version of > Xamarin.iOS you're using and the exact error you get while building. > > Sebastien > > [1] http://bugzilla.xamarin.com >> >> 1. If we you have solution how to fix #1 without using linking .we can >> wait for item no #2. >> >> Thanks, >>Costa >> >> >> >> _______ >> MonoTouch mailing list >> MonoTouch@lists.ximian.com >> http://lists.ximian.com/mailman/listinfo/monotouch >> > > > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Same app seems to follow two different paths - any ideas?
Very strange. I've not seen this before - I'd guess version differences with X.iOS, but I'm not sure... Can you remote into the other machine and have a play? On 28 April 2013 17:01, Paul Johnson wrote: > Hi, > > >> Is is being ignored, or just no debugging? > > > Being ignored > > >> What happens if you put Console.WriteLine or Debug.WriteLine in there? >> do you see output? > > > See nothing > > >> What happens if you install the sims? > > > Nothing. > > One thing I did find was that if it ignores the first instance of an error > (it is returning AppDelegate.Self.LB.LocalizedString(string token) but Self > is null so the app dies) then AppDelegate is seen and everything works from > there on in. Again, don't see this on the version I have here, but only on > the other machine. > > > Paul > > -- > "Space," it says, "is big. Really big. You just won't believe how vastly, > hugely, mindbogglingly big it is. I mean, you may think it's a long way down > the road to the chemist's, but that's just peanuts to space, listen..." > Hitch Hikers Guide to the Galaxy, a truly remarkable book! > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Same app seems to follow two different paths - any ideas?
Is is being ignored, or just no debugging? What happens if you put Console.WriteLine or Debug.WriteLine in there? do you see output? What happens if you install the sims? On 28 April 2013 01:52, Paul Johnson wrote: > Hi, > > Got an interesting problem here. I have the same app running on two > identical machines with the same software and OS set ups (two Mac minis, the > other one is the Australia) > > The app has been developed on my machine, committed to svn and then brought > down to the aussie box and built. > > When I run the debugger here, the app fires through and picks things up > correctly from AppDelegate for localisation. The one in Australia completely > ignores AppDelegate. By that I mean none of the break points in AppDelegate > are hit, they are on my box. > > Is there any way to find why the flow is completely different between the > machines? > > The only difference between the the machines is that I have the simulators > for iOS 5, 5.1 and 6 installed whereas the other box doesn't. When I build > for 6.1, everything works at this end. > > I've noticed some of the xib files are set for a target of iOS 3. Is this > likely to be the issue? > > Paul > -- > "Space," it says, "is big. Really big. You just won't believe how vastly, > hugely, mindbogglingly big it is. I mean, you may think it's a long way down > the road to the chemist's, but that's just peanuts to space, listen..." > Hitch Hikers Guide to the Galaxy, a truly remarkable book! > > _______ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] How to access pdf controls through program.
As far as I know, you can't, not with the built in PDF stuff on iOS (with or without Xamarin tools) Forms are usually a function of Adobe Acrobat, not the PDF "standard". So, you could save to, and load in, Acrobat if the user had it installed, tho I'm not sure how you would get the PDF back. Or you could use something like Foxit http://www.foxitsoftware.com/products/sdk/embedded/ios/ PSPSDKIT might work too http://pspdfkit.com/ I think someone (D. Alex Soto) did bindings for it a while back, so they should be in the Xamarin bindings github repo. On 26 April 2013 06:42, madhusudhan reddy wrote: > I have a pdf in my application .That pdf will contain Textbox and > radiobutton controls.I need to bind data to that pdf controls like(Textboxes > & checkboxes etc).How can i access pdf controls through program?? > > Thanks in advance for replying to my email. > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Unable to get the simulators to launch
Which version of xcode and xamarin studio do you have? On 24 April 2013 16:06, Paul Johnson wrote: > Hi, > > I'm trying to deploy to the simulators (iPad and iPhone), but no matter > which one I choose, I get the same error > > warning MT1201: Could not load the simulator: > dlopen(/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/iPhoneSimulatorRemoteClient.framework/Versions/A/iPhoneSimulatorRemoteClient, > 1): Library not loaded: > @rpath/DevToolsFoundation.framework/Versions/A/DevToolsFoundation > Referenced from: > /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/iPhoneSimulatorRemoteClient.framework/Versions/A/iPhoneSimulatorRemoteClient > Reason: image not found > > What do I need to install to get the simulators to work? > > Paul > -- > "Space," it says, "is big. Really big. You just won't believe how vastly, > hugely, mindbogglingly big it is. I mean, you may think it's a long way down > the road to the chemist's, but that's just peanuts to space, listen..." > Hitch Hikers Guide to the Galaxy, a truly remarkable book! > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Open a PDF with the built in PDF Viewer without closing the Application.
Yes, it is :) https://gist.github.com/nicwise/5443188 Also, look at QLPreviewController and see whats out there. I'm pushing it, but you can also present it like any other view controller. On 23 April 2013 13:28, madhusudhan reddy wrote: > Is it possible to open a pdf using the built in PDF viewer? The same one > that is used if I open a PDF from my iBooks? > And also it should be done without having to leave the app > > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Adding a UISwitch to a Navigation Item.
By NavigationItem, I assume you mean the top bar in a UINavigationController? Where do you want to add it? In the middle or left/right side? The middle is fairly easy, at least for segment controls: var segmentControl = new UISegmentedControl(new RectangleF(0,0,200,25)); //etc dvc.NavigationItem.TitleView = segmentControl; (dvc is a dialogViewController, but it'll work with any UITableViewController) left and right side might be harder tho. On 22 April 2013 20:53, Mike Murdock wrote: > Anyone know how to do this? > > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Objective C to C#
BTW, was good meeting you at Evolve! I hope you had a good time :) On 19 April 2013 11:22, Nic Wise wrote: > Hi Mike > > This should do it :) > > if (arect.Contains(activefield.Frame.Origin)) > { > var scrollpoint = new PointF (0f, activeField.Frame.Y - > kbSize.Height); > > scrollView.SetContentOffset (scrollpoint, true); > } > > > > > On 19 April 2013 10:02, Mike Murdock wrote: > >> Trying to convert the following in C# can anyone help? >> >> ** ** >> >> if (!CGRectContainsPoint(aRect, activeField.frame.origin) ) { >> >> CGPoint scrollPoint = CGPointMake(0.0, >> activeField.frame.origin.y-kbSize.height); >> >> [scrollView setContentOffset:scrollPoint animated:YES]; >> >> } >> >> ** ** >> >> Thanks >> >> Michael Murdock >> >> AllMeds >> >> ** ** >> >> ___ >> MonoTouch mailing list >> MonoTouch@lists.ximian.com >> http://lists.ximian.com/mailman/listinfo/monotouch >> >> > > > -- > Nic Wise > t. +44 7788 592 806 | @fastchicken > b. http://www.fastchicken.co.nz/ > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Objective C to C#
Hi Mike This should do it :) if (arect.Contains(activefield.Frame.Origin)) { var scrollpoint = new PointF (0f, activeField.Frame.Y - kbSize.Height); scrollView.SetContentOffset (scrollpoint, true); } On 19 April 2013 10:02, Mike Murdock wrote: > Trying to convert the following in C# can anyone help? > > ** ** > > if (!CGRectContainsPoint(aRect, activeField.frame.origin) ) { > > CGPoint scrollPoint = CGPointMake(0.0, > activeField.frame.origin.y-kbSize.height); > > [scrollView setContentOffset:scrollPoint animated:YES]; > > } > > ** ** > > Thanks > > Michael Murdock > > AllMeds > > ** ** > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] UISplitViewController(?) with master/detail
Well, you can port it (good if it's not too much code and it's already quite stable), or bind it (better if there is a LOT of code, or it's being actively developed). Binding takes a bit to get the bindings working, but once they are, you're set. On 9 April 2013 14:52, Brian Matsik wrote: > Thanks for the different suggestions everyone. I think the CLCascade example > on GitHub might be a better alternative to this. I just need to get some > code converted over to use it with MonoTouch since the project is an XCode > project. It's a good looking view based on Twitter's UI and uses less space > for the list per Nic's suggestion below. > > -Original Message- > From: Nic Wise [mailto:n...@fastchicken.co.nz] > Sent: Saturday, April 06, 2013 3:27 AM > To: Brian Matsik > Cc: MonoTouch@lists.ximian.com > Subject: Re: [MonoTouch] UISplitViewController(?) with master/detail > > BTW, personally, I dont like how resco have done it (tho it's most likely a > good demo). The LHS is WAY too big. > > I'd do it more like this: > > http://www.rememberthemilk.com/services/ipad/ > > Minimal menu (which can be covered) > small/medium master (based on what you need to show), which MIGHT be hidden > my the detail HUGE detail > > Depends how much switching between major areas (menu) your users are going to > be doing. If it's not much, then get rid of the menu. If it's a lot... maybe > rethink your app structure :) > > > > On 6 April 2013 08:24, Nic Wise wrote: >> What I suspect Resco are doing is this: >> >> Main View or window (just a normal UIView / UIViewController) >> A UITableView(Controller) (or use MonoTouch.Dialog, but be careful >> of the autoresizing) which has a specific width/height. This is your >> left side menu >> A UISplitview(Controller) which contains >> a UITableViewContoller (the middle bit) >> whatever the detail view is (UITabController with >> UINavigationControllers I suspect) >> >> Thats how I'd do it, I think. If you use a splitview, you are stuck >> with the default splitview size I think (otherwise, look at >> MGSplitViewController), but you also get a portrate mode view for >> free. I ended up writing my own (minimal code) for a recent project, >> and I put a UICollectionViewController in each side. >> (https://gist.github.com/nicwise/5325253) >> >> In a demo for Evolve, I'm doing something _similar_ on the iPhone >> using James Clancey's FlyoutNavigationView (on github and the Xamarin >> component store). The view that's under the flyout (the black bit) is >> just a UITableView (via Monotouch.Dialog) and the main bit is a >> UINavigationController with a MonoTouch.Dialog view, but it could be >> any view. >> >> Because almost any view can contain other views, you are not limited >> to the ordering. (except possibly tab bars, which like being at the >> bottom of the tree, in most cases) >> >> https://www.dropbox.com/s/4qrsxhlqry5o09u/mtd-flyout.png >> >> However, you said you wanted a fullscreen detail with a slide in >> master? There are a few ways you could do that >> >> Main View >> Detail view (full screen) >> >> No surprise there >> >> Then, to show the master, you could use a UIPopoverViewController to >> show it off a button or other event, or you could just make the master >> view, set it frame so it's offscreen (relative to the Main View/Window >> above), bring it to the front, then animate it sliding in >> >> UIView.Animate(0.5f, delegate { >> MasterView.Frame = FINAL_FRAME_LOCATION; >> }); >> >> >> Main View >> Detail view (full screen) >> MasterView (200x768, but with a X position of -200 taking it out of >> sight) >> >> So if your MasterView started at a frame of: >> >> new RectangleF(-200,0,200,768); >> >> (so it's just off screen) >> >> and your final frame location would be >> >> new RectangleF(0,0,200,768) >> >> so it's in the top left corner. >> >> You could trigger this off a UISwipeGesture (attached to the Main >> View, or the detail, but the Main might be better), or a button, or >> whatever you wanted. >> >> Does that make sense? >> >> On 5 April 2013 17:19, Brian Matsik wrote: >>> We’re starting our first iPad app and I’m trying to wrap my head >>> around all of the new UI elements moving from web applications to >>> iOS. I am trying to implement a table result to d
Re: [MonoTouch] Missing overlapped annotations
Can you post code on how you are drawing? On 9 April 2013 07:51, Naresh wrote: > <http://monotouch.2284126.n4.nabble.com/file/n4658224/missing_annotations.png> > > Hi, > While I'm trying to draw cross lines on iPad view , Its erasing the > overlapped part of previous line. I'm using setNeedsDisplayInRect() method > to refresh drawings. please suggest me to overcome this issue. > > > > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/Missing-overlapped-annotations-tp4658224.html > Sent from the MonoTouch mailing list archive at Nabble.com. > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Adding default build action
If you right click on an item, you can select properties. In there, there is a custom build action option. Might not be what you want tho If you dont get a reply from the Xamarin people, ask on the Forums, as someone like Michael Hutchinson or Mike Krueger would most likely know. On 6 April 2013 11:41, Francesco Colombo wrote: > Hi, > > I'm working on several projects which need a lot of "content" files to be > added, having the build action set as "Content". > > It is possible to configure in MD a default build action for certain file > types? Do I need to create a project template? Is there any simpler way to > achieve this? There is any tutorial to learn how to create project > templates? Is there any way to extend the default project template? > > thanks > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] UISplitViewController(?) with master/detail
BTW, personally, I dont like how resco have done it (tho it's most likely a good demo). The LHS is WAY too big. I'd do it more like this: http://www.rememberthemilk.com/services/ipad/ Minimal menu (which can be covered) small/medium master (based on what you need to show), which MIGHT be hidden my the detail HUGE detail Depends how much switching between major areas (menu) your users are going to be doing. If it's not much, then get rid of the menu. If it's a lot... maybe rethink your app structure :) On 6 April 2013 08:24, Nic Wise wrote: > What I suspect Resco are doing is this: > > Main View or window (just a normal UIView / UIViewController) > A UITableView(Controller) (or use MonoTouch.Dialog, but be careful > of the autoresizing) which has a specific width/height. This is your > left side menu > A UISplitview(Controller) which contains > a UITableViewContoller (the middle bit) > whatever the detail view is (UITabController with > UINavigationControllers I suspect) > > Thats how I'd do it, I think. If you use a splitview, you are stuck > with the default splitview size I think (otherwise, look at > MGSplitViewController), but you also get a portrate mode view for > free. I ended up writing my own (minimal code) for a recent project, > and I put a UICollectionViewController in each side. > (https://gist.github.com/nicwise/5325253) > > In a demo for Evolve, I'm doing something _similar_ on the iPhone > using James Clancey's FlyoutNavigationView (on github and the Xamarin > component store). The view that's under the flyout (the black bit) is > just a UITableView (via Monotouch.Dialog) and the main bit is a > UINavigationController with a MonoTouch.Dialog view, but it could be > any view. > > Because almost any view can contain other views, you are not limited > to the ordering. (except possibly tab bars, which like being at the > bottom of the tree, in most cases) > > https://www.dropbox.com/s/4qrsxhlqry5o09u/mtd-flyout.png > > However, you said you wanted a fullscreen detail with a slide in > master? There are a few ways you could do that > > Main View > Detail view (full screen) > > No surprise there > > Then, to show the master, you could use a UIPopoverViewController to > show it off a button or other event, or you could just make the master > view, set it frame so it's offscreen (relative to the Main View/Window > above), bring it to the front, then animate it sliding in > > UIView.Animate(0.5f, delegate { > MasterView.Frame = FINAL_FRAME_LOCATION; > }); > > > Main View > Detail view (full screen) > MasterView (200x768, but with a X position of -200 taking it out of sight) > > So if your MasterView started at a frame of: > > new RectangleF(-200,0,200,768); > > (so it's just off screen) > > and your final frame location would be > > new RectangleF(0,0,200,768) > > so it's in the top left corner. > > You could trigger this off a UISwipeGesture (attached to the Main > View, or the detail, but the Main might be better), or a button, or > whatever you wanted. > > Does that make sense? > > On 5 April 2013 17:19, Brian Matsik wrote: >> We’re starting our first iPad app and I’m trying to wrap my head around all >> of the new UI elements moving from web applications to iOS. I am trying to >> implement a table result to detail view similar to what is seen in the Resco >> CRM application (http://www.resco.net/mobilecrm/app.aspx) where the left >> column is the menu and the right is the detail view which could either be a >> full width table or a narrow table with a detail view. >> >> >> >> Example 1 (full table): >> https://www.dropbox.com/s/cxwqpudhxchm4m1/2013-04-05%2012.00.11.png >> >> Example 2 (resized table/detail): >> https://www.dropbox.com/s/593kce49osnb4xd/2013-04-05%2012.00.24.png >> >> >> >> What I want to do is have the table display the full width of the iPad >> window and then slide to a smaller table to display the detail view. This >> is obviously doable but trying to find a sample of this is eluding me mostly >> because I am missing some key search terms to locate a similar example on >> github or one of the many monotouch blogs. >> >> >> >> If anyone could point me in the general direction of what I am looking for I >> would greatly appreciate it. >> >> >> ___ >> MonoTouch mailing list >> MonoTouch@lists.ximian.com >> http://lists.ximian.com/mailman/listinfo/monotouch >> > > > > -- > Nic Wise > t. +44 7788 592 806 | @fastchicken > b. http://www.fastchicken.co.nz/ -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] UISplitViewController(?) with master/detail
What I suspect Resco are doing is this: Main View or window (just a normal UIView / UIViewController) A UITableView(Controller) (or use MonoTouch.Dialog, but be careful of the autoresizing) which has a specific width/height. This is your left side menu A UISplitview(Controller) which contains a UITableViewContoller (the middle bit) whatever the detail view is (UITabController with UINavigationControllers I suspect) Thats how I'd do it, I think. If you use a splitview, you are stuck with the default splitview size I think (otherwise, look at MGSplitViewController), but you also get a portrate mode view for free. I ended up writing my own (minimal code) for a recent project, and I put a UICollectionViewController in each side. (https://gist.github.com/nicwise/5325253) In a demo for Evolve, I'm doing something _similar_ on the iPhone using James Clancey's FlyoutNavigationView (on github and the Xamarin component store). The view that's under the flyout (the black bit) is just a UITableView (via Monotouch.Dialog) and the main bit is a UINavigationController with a MonoTouch.Dialog view, but it could be any view. Because almost any view can contain other views, you are not limited to the ordering. (except possibly tab bars, which like being at the bottom of the tree, in most cases) https://www.dropbox.com/s/4qrsxhlqry5o09u/mtd-flyout.png However, you said you wanted a fullscreen detail with a slide in master? There are a few ways you could do that Main View Detail view (full screen) No surprise there Then, to show the master, you could use a UIPopoverViewController to show it off a button or other event, or you could just make the master view, set it frame so it's offscreen (relative to the Main View/Window above), bring it to the front, then animate it sliding in UIView.Animate(0.5f, delegate { MasterView.Frame = FINAL_FRAME_LOCATION; }); Main View Detail view (full screen) MasterView (200x768, but with a X position of -200 taking it out of sight) So if your MasterView started at a frame of: new RectangleF(-200,0,200,768); (so it's just off screen) and your final frame location would be new RectangleF(0,0,200,768) so it's in the top left corner. You could trigger this off a UISwipeGesture (attached to the Main View, or the detail, but the Main might be better), or a button, or whatever you wanted. Does that make sense? On 5 April 2013 17:19, Brian Matsik wrote: > We’re starting our first iPad app and I’m trying to wrap my head around all > of the new UI elements moving from web applications to iOS. I am trying to > implement a table result to detail view similar to what is seen in the Resco > CRM application (http://www.resco.net/mobilecrm/app.aspx) where the left > column is the menu and the right is the detail view which could either be a > full width table or a narrow table with a detail view. > > > > Example 1 (full table): > https://www.dropbox.com/s/cxwqpudhxchm4m1/2013-04-05%2012.00.11.png > > Example 2 (resized table/detail): > https://www.dropbox.com/s/593kce49osnb4xd/2013-04-05%2012.00.24.png > > > > What I want to do is have the table display the full width of the iPad > window and then slide to a smaller table to display the detail view. This > is obviously doable but trying to find a sample of this is eluding me mostly > because I am missing some key search terms to locate a similar example on > github or one of the many monotouch blogs. > > > > If anyone could point me in the general direction of what I am looking for I > would greatly appreciate it. > > > _______ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Change Language for Connected Outlets programmatically
You have a few choices for this. I'd suggest you look at Vernacular, which is what Rdio made for their app (the iOS and Android ones are done with Xamarin tools): https://github.com/rdio/vernacular Failing that, iOS provides multi-language stuff via XIB's and NSLocalizedString, but a lot of it is manual. You'd need to read the apple docs for that, or see if there is anything on the Xamarin docs site, http://docs.xamarin.com/guides/ios/advanced_topics/localization_and_internationalization Not something I've had to do except to look at it. You might want to try the forums (http://forums.xamarin.com/) which has more people who might have done it. On 5 April 2013 06:17, madhusudhan reddy wrote: > I have a Large Application in that there are so many UiLabels and button > controls will be available.My requriment is when i select a particular > language i need to change the Language of that all controls to that > particular selected language.i have Text language file throught that i need > to access .I have a code for this but problem is how to change language for > all connected outlets(Uilabels and buttons) programmatically . > I am waiting for your valuable replies.Thanks in Advance > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Strange crash
I'd suggest you raise a bug in Bugzilla. Or, if Sebastien or Rolf is around, they may be able to help more. On 3 April 2013 18:21, Juan M Gómez wrote: > Hi Nic! > > Thank you for the reply. The button is mapped from a xib file, so it is in > a class scope. I even changed the lambda, I'm currently using an action > instead, but no way. The app is still crashing... :( > > Best > > Juan M Gómez > *Contractor Software Engineer* > juamangom...@gmail.com > >[image: twitter] <http://twitter.com/_jmgomez_> [image: > linkedIn]<http://es.linkedin.com/in/juamangomalv> > > > > 2013/4/3 Nic Wise > >> Hi Juan >> >> here's the key (I think!): >> >> "Unhandled managed exception: Selector invoked from objective-c on a >> managed object of type MonoTouch.UIKit.UIControlEventProxy (0x1432A3B0) >> that has been GC'ed (System.Exception)" >> >> You have something - the UIButton I suspect - which exists in ObjC land, >> which is trying to call the delegate, but the button has been GC'ed in C# >> land, and it has nowhere to call into. >> >> Where is ButtonX declared? Does it only happen when you tap the button? >> Can you move the declaration of ButtonX to somewhere where it will always >> remain in scope? eg, in the class, not in your method? >> >> Cheers >> >> Nic >> >> >> >> On 3 April 2013 17:37, Juan M Gómez wrote: >> >>> Hi guys, >>> >>> I have a weird issue in my app. I made a custom control with some >>> ViewControllers inside it. The custom control derivates from UIScrollView, >>> but I think that the issue is not about this, just to clarify. >>> >>> When one, and only one, of thoses uiviewcontroller has a TouchuUpInside >>> via UIButton, the app just crashes although I don't do nothing inside it. >>> >>> ButtonX.TouchUpInside += (sender, e) =>{ >>> //This crashes >>> //If I dont declare this lambda, the app doesnt crash >>> }; >>> >>> cheers >>> >>> >>> Unhandled Exception: >>> 0 GolfTouch 0x000f2fde >>> mono_handle_exception_internal_first_pass + 2190 >>> 1 GolfTouch 0x000f4a22 >>> mono_handle_exception_internal + 1602 >>> 2 GolfTouch 0x000f556f mono_handle_exception >>> + 47 >>> 3 GolfTouch 0x001386a2 >>> mono_x86_throw_exception + 306 >>> 4 ??? 0x0b5d5f8f 0x0 + 190668687 >>> at MonoTouch.ObjCRuntime.Runtime.GetNSObject (intptr) [0x0001f] in >>> /Developer/MonoTouch/Source/monotouch/src/ObjCRuntime/Runtime.cs:328 >>> at MonoTouch.ObjCRuntime.Runtime.GetNSObjectWrapped (intptr) [0x0] >>> in /Developer/MonoTouch/Source/monotouch/src/ObjCRuntime/Runtime.cs:345 >>> at (wrapper native-to-managed) >>> MonoTouch.ObjCRuntime.Runtime.GetNSObjectWrapped (intptr) >> 0x00094> >>> 8 GolfTouch 0x0026dbd3 >>> get_managed_object_for_ptr + 115 >>> 9 GolfTouch 0x00272ac0 monotouch_trampoline >>> + 448 >>> 10 libobjc.A.dylib 0x041f8705 -[NSObject >>> performSelector:withObject:withObject:] + 77 >>> 11 UIKit 0x019542c0 -[UIApplication >>> sendAction:to:from:forEvent:] + 96 >>> 12 UIKit 0x01954258 -[UIApplication >>> sendAction:toTarget:fromSender:forEvent:] + 61 >>> 13 UIKit 0x01a15021 -[UIControl >>> sendAction:to:forEvent:] + 66 >>> 14 UIKit 0x01a1557f -[UIControl(Internal) >>> _sendActionsForEvents:withEvent:] + 578 >>> 15 UIKit 0x01a146e8 -[UIControl >>> touchesEnded:withEvent:] + 546 >>> 16 UIKit 0x01c181d3 >>> _UIGestureRecognizerUpdate + 7407 >>> 17 CoreFoundation 0x03f77afe >>> __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30 >>> 18 CoreFoundation 0x03f77a3d >>> __CFRunLoopDoObservers + 381 >>> 19 CoreFoundation 0x03f557c2 __CFRunLoopRun + 1106 >>> 20 CoreFoundation 0x03f54f44 CFRunLoopRunSpecific >>> + 276 >>> 21 CoreFoundation 0x03f54e1b CFRunLoopRunInMode + >>> 123 >>> 22 Gr
Re: [MonoTouch] Strange crash
in + 1988 > 41 GolfTouch 0x00066471 start + 53 > > = > Got a SIGABRT while executing native code. This usually indicates > a fatal error in the mono runtime or one of the native libraries > used by your application. > = > > > Juan M Gómez > *Contractor Software Engineer* > juamangom...@gmail.com > >[image: twitter] <http://twitter.com/_jmgomez_> [image: > linkedIn]<http://es.linkedin.com/in/juamangomalv> > > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Port of MTStatusBarOverlay for monotouch
Nope, here's all good :) On 30 March 2013 18:01, thecoachfr wrote: > Hi, > > If its the wrong place to post that kind of info please excuse me. > As I need it and didn't find a equivalent, I port to monotouch a status bar > overlay window known from Apps like Reeder, Google Mobile App or Evernote. > The original library is here : https://github.com/myell0w/MTStatusBarOverlay > > And the monotouch version here : > https://github.com/thecoachfr/StatusBarOverlayMonoTouch > > Enjoy, > Alex. > > > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/Port-of-MTStatusBarOverlay-for-monotouch-tp4658195.html > Sent from the MonoTouch mailing list archive at Nabble.com. > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] strange compilation error
me) > [0x0] in :0 > at MonoTouch.Tuner.MonoTouchResolver.SearchDirectory (System.String name, > System.String directory) [0x0] in :0 > at MonoTouch.Tuner.MonoTouchResolver.Resolve > (Mono.Cecil.AssemblyNameReference reference) [0x0] in unknown>:0 > at MonoTouch.Tuner.MonoTouchResolver.Resolve (System.String fullName) > [0x0] in :0 > at MonoTouch.Tuner.MonoTouchResolver.GetAssembly (System.String fileName) > [0x0] in :0 > at MTouch.ExtractNativeLinkInfo (System.String project_root, > System.Collections.Generic.List`1 references) [0x0] in unknown>:0 > at MTouch.Main2 (System.String[] args) [0x0] in :0 > at MTouch.Main (System.String[] args) [0x0] in :0 > > - Fertig - > > Multiple provisioning profiles match the bundle identifier; using the first > match. > Build: 1 Fehler, 5 Warnungen > > > If i remove the line "HaarObjectDetector detector;" the project compiles > again…?! > > > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] ViewDidAppear is called before the view appear
Because you are not showing your secondVC directly, it's ViewDidAppear will be called when it appears in it's parent (the UINavigationController) which is then animated onto the screen. You could hook into the UINavigationController's ViewDidAppear and then call the child one (or a similar method) when it gets called... ViewDidAppear might not be a good one for this tho. If you animate it on screen (which you are doing), then it "appears" offscreen, and is then moved, which isn't what you are expecting to happen. The last param of this.NavigationController.PresentViewController(new UINavigationController(secondVC){ ModalTransitionStyle= UIModalTransitionStyle.CoverVertical, }, false,null); which you pass null into is a callback for when the animation has finished. You could do something in there, eg: delegate { secondVC.YoureOnTheScreenNow(); } On 27 March 2013 06:26, c0ld wrote: > I set animated=false in AppDelegate, when i present firstVC. And > ViewDidAppear was called before there view, like in secondVC. I think it > doesn't depend on the order of viewcontrollers. What should I do? > > > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/ViewDidAppear-is-called-before-the-view-appear-tp4658184p4658190.html > Sent from the MonoTouch mailing list archive at Nabble.com. > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Adding Footer View
Where did you find the code? Is there more context to it? Basically, that method is called to get the footerview for any section (a table has sections, a section has cells), so I'd guess that GetSection is finding the correct section, so it can work out whats ment to be in the footer view. This is very similar to how MonoTouch.Dialog works, BTW. On 28 March 2013 16:05, mobiledev1600 wrote: > Hi, > > I am trying to add a Footer view with button in my table view. I found this > code online > > public override UIView GetViewForFooter(UITableView tableView, int > sectionIndex) > { > // Write a method to get the proper Section via the sectionIndex > var section = GetSection(sectionIndex); > if (section != null) > { > if (section.FooterView == null && > !string.IsNullOrEmpty(section.FooterText)) > { > // Create your FooterView here > section.FooterView = CreateFooterView(tableView, > section.FooterText); > } > > return section.FooterView; > } > > return null; > } > > I dont know what *GetSection* method is? I am having error "The name > GetSection does not exist in the current context" . > > I couldn't find any proper documentation on MonoTouch site as well. > > Help is appreciated. > > > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/Adding-Footer-View-tp4658194.html > Sent from the MonoTouch mailing list archive at Nabble.com. > _______ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] ViewDidAppear is called before the view appear
It may be that the SecondVC is "appearing" inside the UINavigationController, which is then shown (animated) Can you hook onto the UINavigationController's ViewDidAppear? Or try to present just your SecondVC to see if thats the issue (ie, don't wrap it in the UINavController) On 26 March 2013 09:41, c0ld wrote: > Hello. Have some problem again. When I switching to some > viewcontroller(secondVC) using PresentViewController like this: > > this.NavigationController.PresentViewController(new > UINavigationController(secondVC){ > ModalTransitionStyle= UIModalTransitionStyle.CoverVertical, > }, false,null); > > If paramter "animated" set in false, func ViewDidAppear in secondVC will be > called before the view is displayed. Is it normal for function with name > ViewDidAppear ? > > Thanks. > > Test project: https://github.com/c0ldd/MonotouchTest > > > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/ViewDidAppear-is-called-before-the-view-appear-tp4658184.html > Sent from the MonoTouch mailing list archive at Nabble.com. > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Line at Uiview
http://stackoverflow.com/questions/4685589/very-simple-test-view-in-monotouch-draws-a-line-using-core-graphics-but-view-con With code (tho, as the first answer points out, it's Draw(RectangleF) not Draw(RectangleF, UIViewPrintFormatter) On 22 March 2013 15:40, jenia wrote: > Using Monotouch, how would I draw a simple line in a uiview that is > currently being display? > > Simple example is of course fine. > > > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/Line-at-Uiview-tp4658178.html > Sent from the MonoTouch mailing list archive at Nabble.com. > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] The app references non-public selectors in MyApp.app/MyApp: apply
I need to submit an app shortly, too. I think Rolf said he has a fix (they changed the name), but the new release with it in isn't out yet. YET. :) On 26 March 2013 11:05, Guido Van Hoecke wrote: > Hi Nic, > Hi Nic, > > Thanks for the info. > > Hope they come up with a solution soon, I got three more apps to update :( > > Guido > > On 26 March 2013 09:43, Nic Wise wrote: >> Sebastien is on the thread in the forum, and he (or Rolf) is the one >> who can fix it. >> >> Literally - those 2 are the core X.iOS engineers. >> >> :) >> >> Not sure which build it'll be in tho. >> >> On 26 March 2013 07:42, Guido Van Hoecke wrote: >>> Hi, >>> >>> I just uploaded a new version of my app and got following warning at the >>> end of the upload: >>> >>>> The app references non-public selectors in MyApp.app/MyApp: apply >>> >>> How can I find where this 'apply' selector is used, and even better, how >>> can I get rid of it? >>> >>> I'd rather fix this now rather than being rejected after a one to two >>> weeks 'Waiting for review' time. >>> >>> I've found a forum thread about this problem, but no solution yet: >>> >>> Forum thread: http://forums.xamarin.com/discussion/comment/8953/ >>> >>> Please advise, >>> >>> >>> Guido >>> >>> -- >>> I think your opinions are reasonable, >>> except for the one about my mental instability. >>> -- Psychology Professor, Farifield University >>> >>> http://vanhoecke.org ... and go2 places! >>> ___ >>> MonoTouch mailing list >>> MonoTouch@lists.ximian.com >>> http://lists.ximian.com/mailman/listinfo/monotouch >> >> >> >> -- >> Nic Wise >> t. +44 7788 592 806 | @fastchicken >> b. http://www.fastchicken.co.nz/ -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] The app references non-public selectors in MyApp.app/MyApp: apply
Sebastien is on the thread in the forum, and he (or Rolf) is the one who can fix it. Literally - those 2 are the core X.iOS engineers. :) Not sure which build it'll be in tho. On 26 March 2013 07:42, Guido Van Hoecke wrote: > Hi, > > I just uploaded a new version of my app and got following warning at the > end of the upload: > >> The app references non-public selectors in MyApp.app/MyApp: apply > > How can I find where this 'apply' selector is used, and even better, how > can I get rid of it? > > I'd rather fix this now rather than being rejected after a one to two > weeks 'Waiting for review' time. > > I've found a forum thread about this problem, but no solution yet: > > Forum thread: http://forums.xamarin.com/discussion/comment/8953/ > > Please advise, > > > Guido > > -- > I think your opinions are reasonable, > except for the one about my mental instability. > -- Psychology Professor, Farifield University > > http://vanhoecke.org ... and go2 places! > _______ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Change direction of push transition animation to left
I've done this by pre-pushing a view controller - ie, my stack looks like: Tax Overview Detail the user starts at Overview. They can go back to tax, or forward to detail On 22 March 2013 05:56, c0ld wrote: > Hello. Was same problem. There is no normal solution for this. > PushViewController is limited by the standard animation(type of > UIViewAnimationTransition). If you want to change them, try this: > > NavigationController.PushViewController(screen, false); > var theAnimation = CABasicAnimation.FromKeyPath("transform.translation.x"); > theAnimation.Duration = 0.6f; > theAnimation.From = > NSNumber.FromFloat(-NavigationController.View.Frame.Width); > theAnimation.To = NSNumber.FromFloat(0f); > NavigationController.View.Layer.AddAnimation(theAnimation, "animate"); > NavigationController.View.Layer.AnimationForKey("animate"); > > But it is not perfect, try and u see why. Also u can use > PresentViewController. It have some other standart animations in > UIModalTransitionStyle: > > this.NavigationController.PresentViewController(new > UINavigationController(screen){ > ModalTransitionStyle= UIModalTransitionStyle.CoverVertical, > }, true,null); > > > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/Change-direction-of-push-transition-animation-to-left-tp4658087p4658173.html > Sent from the MonoTouch mailing list archive at Nabble.com. > _______ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Using .Resx for localization
Oh yes, thats going to be a mess. I assume they are already translated? (I've never tried using resx BTW) Could you put them in the root of separate assemblies? Or one separate assembly? On 21 March 2013 17:07, spongebob wrote: > in short I have over 100 .Resx files in 7 languages, and if i have to store > them all on the root of the application it is an administrative nightmare. > > > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/Using-Resx-for-localization-tp4658163p4658169.html > Sent from the MonoTouch mailing list archive at Nabble.com. > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Xamarin.iOS to Xamarin.Mac Roseta Stone
I've not seen one, but generally CocoaTouch -> Cocoa UI* -> NS* NS* -> NS* (no change) Basically, you have UIKit on CocoaTouch, and you have AppKit, I think, on Cocoa. They don't do the same thing, at all, tho the basic metaphores and patterns are similar. Best thing apple did (and WORST thing MSFT did with windows.forms on desktop and mobile and web) was to throw out the old UI controls and start again with UIKit. You then go in without preconceived notions of what a Button should do for example. Would love to know how you get on, if you blog about it etc. On 21 March 2013 15:43, ric3kg wrote: > I'm about to embark on the voyage of converting an iOS app to the Mac and was > wondering if there might be a Roseta Stone to help guide my journey? > Something like UIWebView = WebView... > > Thanks, > Rick > > > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/Xamarin-iOS-to-Xamarin-Mac-Roseta-Stone-tp4658166.html > Sent from the MonoTouch mailing list archive at Nabble.com. > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Using .Resx for localization
I'm not sure (having not tried it), but if you need to go multilingual, Vernacular is ment to be very good https://github.com/rdio/vernacular (ie, if you can't find a good alternative) On 18 March 2013 14:57, spongebob wrote: > Hello, > > I have been successfully able to access .resx files in my project however > because my project is so big I would like to be able to divide the .resx > files up by language folders, e.g en-EN, es-ES > > When i tried doing this what I discovered is .resx files only work at the > root of the project as embedded resources. > > Is there a way I can separate my .resx files by directory? > > Regards!! > > > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/Using-Resx-for-localization-tp4658163.html > Sent from the MonoTouch mailing list archive at Nabble.com. > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Woes after todays updates
yay! :) Glad to help. Have a look on the forums, BTW - Xamarin posted about it when 2.0 was released. On 9 March 2013 08:11, Guido Van Hoecke wrote: > Nic, > > Once more, my sincere thanks for yet another fast and helpful reply. > > I've rebuilt all my referred dlls's and now my apps build again. > > You're a lifesaver :) > > > Respectfully, > > > Guido. > > > On 8 March 2013 21:51, Nic Wise wrote: >> Did you just update to the Xamarin 2.0 stuff? ie Xamarin Studio 4, >> Xamarin.iOS 6.2 etc? >> >> If so, ALL the monotouch.dll etc are now signed, so you will need to >> rereference them, and if you have any DLLs build against the old ones, >> including any bindings, you need to rebuild them >> >> more info here: >> http://forums.xamarin.com/discussion/1475/changes-to-assembly-strongnames-in-xamarin-ios-6-2-0 >> >> On 8 March 2013 17:39, Guido Van Hoecke wrote: >>> Hi, >>> >>> I have a problem since Today's updates (Mono Framework MDK 2.10.11). >>> >>> I usually do my code editing and compiling in a VirtualBox >>> VS2010. Since the latest updates, VS2010 complains: >>> >>> Error 1 The type 'MonoTouch.UIKit.UIViewController' is defined in an >>> assembly that is not referenced. You must add a reference to assembly >>> 'monotouch, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. ... >>> >>> Error 2 The type 'MonoTouch.Foundation.NSObject' is defined in an >>> assembly that is not referenced. You must add a reference to assembly >>> 'monotouch, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. ... >>> >>> Error 3 The type 'MonoTouch.UIKit.UITableViewController' is defined in >>> an assembly that is not referenced. You must add a reference to assembly >>> 'monotouch, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. ... >>> >>> Let me explain shortly how I have been working for over a year. I have >>> a ~/Mono directory with my solutions. I also have a 'Shared Folder' ~/MS >>> directory with 'shadow' solutions. I create them as Library projects and >>> use a self-made perl script to keep the directory structure and sources >>> in sync. The VS2010 references >>> /Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll and used to be happy >>> in with this setup. >>> >>> Since today's updates, this no longer works. The VS2010 editor does not >>> colorize references as if they would be undefined. So apparently it >>> finds and grasps the dll, but refuses to compile. >>> >>> >>> Any ideas what causes this and how to fix it? >>> >>> >>> TIA, >>> >>> >>> Guido >>> >>> -- >>> No-one would remember the Good Samaritan if he had only had good >>> intentions. He had money as well. >>> -- Margaret Thatcher >>> >>> http://vanhoecke.org ... and go2 places! >>> ___ >>> MonoTouch mailing list >>> MonoTouch@lists.ximian.com >>> http://lists.ximian.com/mailman/listinfo/monotouch >> >> >> >> -- >> Nic Wise >> t. +44 7788 592 806 | @fastchicken >> b. http://www.fastchicken.co.nz/ -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Woes after todays updates
Did you just update to the Xamarin 2.0 stuff? ie Xamarin Studio 4, Xamarin.iOS 6.2 etc? If so, ALL the monotouch.dll etc are now signed, so you will need to rereference them, and if you have any DLLs build against the old ones, including any bindings, you need to rebuild them more info here: http://forums.xamarin.com/discussion/1475/changes-to-assembly-strongnames-in-xamarin-ios-6-2-0 On 8 March 2013 17:39, Guido Van Hoecke wrote: > Hi, > > I have a problem since Today's updates (Mono Framework MDK 2.10.11). > > I usually do my code editing and compiling in a VirtualBox > VS2010. Since the latest updates, VS2010 complains: > > Error 1 The type 'MonoTouch.UIKit.UIViewController' is defined in an > assembly that is not referenced. You must add a reference to assembly > 'monotouch, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. ... > > Error 2 The type 'MonoTouch.Foundation.NSObject' is defined in an > assembly that is not referenced. You must add a reference to assembly > 'monotouch, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. ... > > Error 3 The type 'MonoTouch.UIKit.UITableViewController' is defined in > an assembly that is not referenced. You must add a reference to assembly > 'monotouch, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. ... > > Let me explain shortly how I have been working for over a year. I have > a ~/Mono directory with my solutions. I also have a 'Shared Folder' ~/MS > directory with 'shadow' solutions. I create them as Library projects and > use a self-made perl script to keep the directory structure and sources > in sync. The VS2010 references > /Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll and used to be happy > in with this setup. > > Since today's updates, this no longer works. The VS2010 editor does not > colorize references as if they would be undefined. So apparently it > finds and grasps the dll, but refuses to compile. > > > Any ideas what causes this and how to fix it? > > > TIA, > > > Guido > > -- > No-one would remember the Good Samaritan if he had only had good > intentions. He had money as well. > -- Margaret Thatcher > > http://vanhoecke.org ... and go2 places! > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Dismiss keyboard @ MonoTouch.Dialog
yeah, you add the custom toolbar by using the InputAccessory - you'd need to make your own stringelement (copy the one thats there) and add it in when it's created. If you have ObjC to code change the keyboard, doing it in MonoTouch would be the same - you just need to translate it, which is usually mostly just finding where the names have changed :) On 7 March 2013 14:28, Iki wrote: > Hi Nic, > > sorry for delay, i really don't like the solution with toolbar above, but > the one that you send link to is really nice! > > For now I started using this: > > stringElement.ReturnKeyType = UIReturnKeyType.Done; > stringElement.ShouldReturn += () => > { >stringElement.ResignFirstResponder(true); >return true; > }; > > How would one start with adding custom toolbar for MonoTouch.Dialog? > When using normal UI text field, I have created transparent UIView, and add > it as a input accessory view to the UITextField. > > I was thinking of adding a subview to the keyboard but I don't know the > proper way of referencing keyboard. > I can do it in Objective-C but can't do it using MonoTouch. > > > > I also never found anything that I would like to keep. My latest try was to > load a transparent view above the keyboard > On Mar 7, 2013, at 11:18 AM, Nic Wise wrote: > > I think you need to work out how you want to dismiss it, then trigger > off that. View.EndEditing(true) gets rid of the keyboard, but how you > trigger it is up to you. > > The tap gesture isn't too bad, but as you said, it takes over all taps. > > I quite like the scroll one - maybe you could also trigger it off the > scroll event/message on the TableView? > > Putting a toolbar or view on the keyboard can work, too - PlainText > does it quite well: > https://itunes.apple.com/en/app/plaintext-dropbox-text-editing/id391254385?mt=8 > > I've never found a solution I liked enough to keep it in, except the > toolbar one, and even then it was clunkey. > > > > On 7 March 2013 08:51, Iki wrote: > > Hi guys, > > I know that this is probably asked million of times but I can find a nice > solution to dismiss a keyboard in MonoTouch.Dialog. > > On the internet I have found two solutions, one from Miguel, > > //Gesture recognizer for handling EndEditing of Elements >var tap = new UITapGestureRecognizer (); >tap.AddTarget (() =>{ this.View.EndEditing(true); }); > >this.View.AddGestureRecognizer (tap); > //--- > > > and another solution from stack overflow > > //Hide when dragging start > this.TableView.DraggingStarted += (object sender, EventArgs e) => > { > this.View.EndEditing (true); > }; > > The problem with these two is that it will block any action that comes from > tapping other elements > (example. StringElement) so I can't find a way if using these two to display > picker element, or UIAlertView. > > Do you have any ideas? > > Thanks for help! > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > > > > > -- > Nic Wise > t. +44 7788 592 806 | @fastchicken > b. http://www.fastchicken.co.nz/ > > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Dismiss keyboard @ MonoTouch.Dialog
I think you need to work out how you want to dismiss it, then trigger off that. View.EndEditing(true) gets rid of the keyboard, but how you trigger it is up to you. The tap gesture isn't too bad, but as you said, it takes over all taps. I quite like the scroll one - maybe you could also trigger it off the scroll event/message on the TableView? Putting a toolbar or view on the keyboard can work, too - PlainText does it quite well: https://itunes.apple.com/en/app/plaintext-dropbox-text-editing/id391254385?mt=8 I've never found a solution I liked enough to keep it in, except the toolbar one, and even then it was clunkey. On 7 March 2013 08:51, Iki wrote: > Hi guys, > > I know that this is probably asked million of times but I can find a nice > solution to dismiss a keyboard in MonoTouch.Dialog. > > On the internet I have found two solutions, one from Miguel, > > //Gesture recognizer for handling EndEditing of Elements > var tap = new UITapGestureRecognizer (); > tap.AddTarget (() =>{ this.View.EndEditing(true); }); > > this.View.AddGestureRecognizer (tap); > //--- > > > and another solution from stack overflow > > //Hide when dragging start > this.TableView.DraggingStarted += (object sender, EventArgs e) => > { >this.View.EndEditing (true); > }; > > The problem with these two is that it will block any action that comes from > tapping other elements > (example. StringElement) so I can't find a way if using these two to display > picker element, or UIAlertView. > > Do you have any ideas? > > Thanks for help! > > _______ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Accessing MT.Dialog Elements
(I ment _I_ need to learn F#) On 5 March 2013 22:35, Nic Wise wrote: > Thanks. Instapapered. > > Need to learn F#, too :) > > On 5 March 2013 21:54, Juan M Gómez wrote: >> Yes, it's clousure stuff. If you want you can see why that happens here: >> http://www.defmacro.org/ramblings/fp.html#part_11 although I recommend the >> whole article for everybody, it's pretty nice. >> >> >> >> >> 2013/3/5 Nic Wise >>> >>> Hi Iki >>> >>> for (int i = 0; i < newsList.Count; i++) >>> { >>> StringElement se = new StringElement(newsList[i]); >>> section.Add(se); >>> >>> int localCounter = i; //grab it, 'cos you want to use it >>> inside the lamda, and "i" may have the wrong scope >>> se.Tapped += () => >>> { >>>//DialogViewController with modified ctor (string name) >>> DetailViewController dvc = new >>> DetailViewController(newsList[localCounter]); //use the local one >>> this.NavigationController.PushViewController(dvc,true); >>> }; >>> >>> stringElementsList.Add(se); //you dont need this, you are >>> storing it in the section above! >>> } >>> >>> you might not need the localCounter bit (you might just be able to use >>> i) - try it out. If it always shows the last element, regardless, then >>> use the localCounter bit. I know you need to do this for objects, just >>> not 100% sure on value types :) >>> >>> you could rewrite it like this, too: >>> >>> >>> >>> newsList = new List() >>> { >>> "News - 1" >>>,"News - 2" >>>,"News - 3" >>>,"News - 4" >>> }; >>> >>> foreach(var s in newsList) >>> { >>> >>> string temp = s; //capture outside, use inside the lambda/delegate >>> >>> section.Add(new StringElement(s, () => { >>> DetailViewController dvc = new DetailViewController(temp); >>>this.NavigationController.PushViewController(dvc,true); >>> }); >>> >>> >>> } >>> >>> >>> >>> >>> On 5 March 2013 20:37, Iki wrote: >>> > Hey Juan, >>> > >>> > Thanks for such quick response, as a matter of fact, my approach was >>> > exactly >>> > like Your second solution. >>> > But along the way I have made a mistake while assigning a new >>> > DialogViewController, here is the example of working solution: >>> > >>> > public partial class MainViewController : DialogViewController >>> > { >>> > List newsList; >>> > List stringElementsList; >>> > >>> > public MainViewController () : base (UITableViewStyle.Grouped, null) >>> > { >>> > >>> >Root = new RootElement ("Main View") {}; >>> >Section section = new Section (""); >>> > >>> > >>> > newsList = new List() >>> > { >>> > "News - 1" >>> >,"News - 2" >>> >,"News - 3" >>> >,"News - 4" >>> > }; >>> > >>> > stringElementsList = new List (){}; >>> > >>> > for (int i = 0; i < newsList.Count; i++) >>> > { >>> > StringElement se = new StringElement(newsList[i]); >>> > section.Add(se); >>> > >>> > se.Tapped += () => >>> > { >>> >//DialogViewController with modified ctor (string name) >>> > DetailViewController dvc = new >>> > DetailViewController(newsList[se.IndexPath.Row]); >>> > this.NavigationController.PushViewController(dvc,true); >>> > }; >>> > >>> > stringElementsList.Add(se); >>> > } >>> > >>> > Root.Add (section); >>> > >>> > >>> > } >>> > } >>> > >>> > >>> > &g
Re: [MonoTouch] building a ipa from visual studio with Xamarin Studio
I do it in XS, I dont have VS here. But you do it via Project -> Zip App Bundle (IPA is a zip!) or Build -> Archive and it ends up in the XCode Organiser's archive section. But to do an IPA to upload to itunes, zip app bundle works. Now, does VS have it... I'm not sure :( On 5 March 2013 21:49, John Thornton wrote: > Can anyone tell me how to produce an IPA using XS and a build host from > Visual Studio 2012? > > > > Myself and several others have asked this on the Forums but I’ve seen no > official response yet. Is this supported? > > > > http://forums.xamarin.com/discussion/comment/6384/#Comment_6384 > > http://forums.xamarin.com/discussion/comment/6385/#Comment_6385 > > http://forums.xamarin.com/discussion/comment/6469/#Comment_6469 > > > > Thanks, > > John > > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Accessing MT.Dialog Elements
Thanks. Instapapered. Need to learn F#, too :) On 5 March 2013 21:54, Juan M Gómez wrote: > Yes, it's clousure stuff. If you want you can see why that happens here: > http://www.defmacro.org/ramblings/fp.html#part_11 although I recommend the > whole article for everybody, it's pretty nice. > > > > > 2013/3/5 Nic Wise >> >> Hi Iki >> >> for (int i = 0; i < newsList.Count; i++) >> { >> StringElement se = new StringElement(newsList[i]); >> section.Add(se); >> >> int localCounter = i; //grab it, 'cos you want to use it >> inside the lamda, and "i" may have the wrong scope >> se.Tapped += () => >> { >>//DialogViewController with modified ctor (string name) >> DetailViewController dvc = new >> DetailViewController(newsList[localCounter]); //use the local one >> this.NavigationController.PushViewController(dvc,true); >> }; >> >> stringElementsList.Add(se); //you dont need this, you are >> storing it in the section above! >> } >> >> you might not need the localCounter bit (you might just be able to use >> i) - try it out. If it always shows the last element, regardless, then >> use the localCounter bit. I know you need to do this for objects, just >> not 100% sure on value types :) >> >> you could rewrite it like this, too: >> >> >> >> newsList = new List() >> { >> "News - 1" >>,"News - 2" >>,"News - 3" >>,"News - 4" >> }; >> >> foreach(var s in newsList) >> { >> >> string temp = s; //capture outside, use inside the lambda/delegate >> >> section.Add(new StringElement(s, () => { >> DetailViewController dvc = new DetailViewController(temp); >>this.NavigationController.PushViewController(dvc,true); >> }); >> >> >> } >> >> >> >> >> On 5 March 2013 20:37, Iki wrote: >> > Hey Juan, >> > >> > Thanks for such quick response, as a matter of fact, my approach was >> > exactly >> > like Your second solution. >> > But along the way I have made a mistake while assigning a new >> > DialogViewController, here is the example of working solution: >> > >> > public partial class MainViewController : DialogViewController >> > { >> > List newsList; >> > List stringElementsList; >> > >> > public MainViewController () : base (UITableViewStyle.Grouped, null) >> > { >> > >> >Root = new RootElement ("Main View") {}; >> >Section section = new Section (""); >> > >> > >> > newsList = new List() >> > { >> > "News - 1" >> >,"News - 2" >> >,"News - 3" >> >,"News - 4" >> > }; >> > >> > stringElementsList = new List (){}; >> > >> > for (int i = 0; i < newsList.Count; i++) >> > { >> > StringElement se = new StringElement(newsList[i]); >> > section.Add(se); >> > >> > se.Tapped += () => >> > { >> >//DialogViewController with modified ctor (string name) >> > DetailViewController dvc = new >> > DetailViewController(newsList[se.IndexPath.Row]); >> > this.NavigationController.PushViewController(dvc,true); >> > }; >> > >> > stringElementsList.Add(se); >> > } >> > >> > Root.Add (section); >> > >> > >> > } >> > } >> > >> > >> > >> > On Mar 5, 2013, at 8:11 PM, Juan M Gómez wrote: >> > >> > Hi Iki, >> > There are a few ways to go on: >> > ->Just a specialized class of StringElement that exposes your properties >> > or >> > a new event. >> > ->If you assign the data in the same struct, just use it (if it is a >> > loop, >> > remember to set a new assign in the block of lambda) >> > >> > cheers >> > >> > >> > Juan M Gómez >> > >> &g
Re: [MonoTouch] Accessing MT.Dialog Elements
Hi Iki for (int i = 0; i < newsList.Count; i++) { StringElement se = new StringElement(newsList[i]); section.Add(se); int localCounter = i; //grab it, 'cos you want to use it inside the lamda, and "i" may have the wrong scope se.Tapped += () => { //DialogViewController with modified ctor (string name) DetailViewController dvc = new DetailViewController(newsList[localCounter]); //use the local one this.NavigationController.PushViewController(dvc,true); }; stringElementsList.Add(se); //you dont need this, you are storing it in the section above! } you might not need the localCounter bit (you might just be able to use i) - try it out. If it always shows the last element, regardless, then use the localCounter bit. I know you need to do this for objects, just not 100% sure on value types :) you could rewrite it like this, too: newsList = new List() { "News - 1" ,"News - 2" ,"News - 3" ,"News - 4" }; foreach(var s in newsList) { string temp = s; //capture outside, use inside the lambda/delegate section.Add(new StringElement(s, () => { DetailViewController dvc = new DetailViewController(temp); this.NavigationController.PushViewController(dvc,true); }); } On 5 March 2013 20:37, Iki wrote: > Hey Juan, > > Thanks for such quick response, as a matter of fact, my approach was exactly > like Your second solution. > But along the way I have made a mistake while assigning a new > DialogViewController, here is the example of working solution: > > public partial class MainViewController : DialogViewController > { > List newsList; > List stringElementsList; > > public MainViewController () : base (UITableViewStyle.Grouped, null) > { > >Root = new RootElement ("Main View") {}; >Section section = new Section (""); > > > newsList = new List() > { > "News - 1" >,"News - 2" >,"News - 3" >,"News - 4" > }; > > stringElementsList = new List (){}; > > for (int i = 0; i < newsList.Count; i++) > { > StringElement se = new StringElement(newsList[i]); > section.Add(se); > > se.Tapped += () => > { >//DialogViewController with modified ctor (string name) > DetailViewController dvc = new > DetailViewController(newsList[se.IndexPath.Row]); > this.NavigationController.PushViewController(dvc,true); > }; > > stringElementsList.Add(se); > } > > Root.Add (section); > > > } > } > > > > On Mar 5, 2013, at 8:11 PM, Juan M Gómez wrote: > > Hi Iki, > There are a few ways to go on: > ->Just a specialized class of StringElement that exposes your properties or > a new event. > ->If you assign the data in the same struct, just use it (if it is a loop, > remember to set a new assign in the block of lambda) > > cheers > > > Juan M Gómez > > > 2013/3/5 Iki >> >> Hi guys/gals, >> >> I'm having trouble accessing MonoTouch Dialog elements. >> >> Example is: >> >> I have a list of items from which i create StringElements in section. >> After elements is tapped, i would like to go to a new view, on which i >> would, based on the element tapped filled out the data. >> >> StringElement.Tapped is without parameters, >> >> se.Tapped += () => >> { >> >> >> }; >> >> and i can't find a proper way to send reference of the object that is >> tapped. >> >> I'm currently using DialogViewControllers, for my main view, on which i >> create list of name, and on my detail view which i need to fill up with data >> based on element from the main view. >> >> I did try with this >> >> public void RowSelected (UITableView tableView, NSIndexPath indexPath) >> { >> DetailViewController dvc = new DetailViewController (names >> [indexPath.Row]); >> this.NavigationController.PushViewController (dvc, true); >> } >> >> But I don't see any effect. >> >> Thanks! >> >> >> >> ___ >> MonoTouch mailing list >> MonoTouch@lists.ximian.com >> http://lists.ximian.com/mailman/listinfo/monotouch >> > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > > > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Twin forums
oh, I didn't know that existed. Will ping the xamarin folks - I suspect that's been forgotten about On 25 February 2013 23:50, technohead wrote: > Ah ok. I was always accessing this one via the url > http://ios.xamarin.com/forums, so didn't see the difference. > > thanks, > Dennis > > > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/Twin-forums-tp4658110p4658113.html > Sent from the MonoTouch mailing list archive at Nabble.com. > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Twin forums
yeah, I was sceptical at first (I prefer email), but I've warmed a lot to the forums. The nabble thing is just a wrapper around the mailing list... On 24 February 2013 18:17, Jason Awbrey wrote: > there was discussion of this when the new forums launched - the forums are > the preferred method for discussion now, but the mailing list is being kept > around for those of us who are used to using it (or are too lazy to change) > > http://blog.xamarin.com/introducing-the-xamarin-forums/ > > > > > On Sun, Feb 24, 2013 at 12:08 PM, technohead > wrote: >> >> Hi all, >>been meaning to ask this for awhile, but wondering why there are >> another >> group of forums for Xamarin products (http://forums.xamarin.com)? I've >> been >> mostly coming to this one, but I think the other one seems to be a bit >> more >> lively right now. >> >> Dennis >> >> >> >> -- >> View this message in context: >> http://monotouch.2284126.n4.nabble.com/Twin-forums-tp4658110.html >> Sent from the MonoTouch mailing list archive at Nabble.com. >> ___ >> MonoTouch mailing list >> MonoTouch@lists.ximian.com >> http://lists.ximian.com/mailman/listinfo/monotouch > > > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Mono.CSharp.InternalErrorException
I'd suggest you post on the forums (more people there) and also file it in bugzilla. I've also CCed Sebastien and Rolf, who usually know about internal compiler things Also keep in mind that I suspect most of the Xamarin people didn't get much sleep yesterday :) However, can you post the code around /Users/guivho/Mono/Targister/Targister/Classes/BarButtonView.cs(13,16): Looks like it's having issues with the attribute on a method? Are you using [Attributes] on your method? On 21 February 2013 10:11, Guido Van Hoecke wrote: > Hi, > > My app compiles fine in Visual Studio, but throws an > InternalErrorException in MonoDevelop as well as when building from the > command line. > > I'm stuck. > > I even restarted my Mac, hoping the problem would go away, as it often > did in the MS world, but it did not. > > I can still continue development in the VirtualBox MS environment, but > obviously, I can't do any testing, only provide compiling sources. Alas, > they now compile in MS, not in MD! > > Any ideas, any one? > > > Unhandled Exception: > 0 mono0x000dfe1b mono + 912923 > 1 mono0x000e0285 mono + 914053 > 2 mono0x000e1085 mono + 917637 > 3 mono0x000e1f51 mono + 921425 > 4 mono0x0015169d mono + 1377949 > 5 ??? 0x00500f8f 0x0 + 5246863 > at Mono.CSharp.TypeContainer.EmitType () <0x0013c> > at Mono.CSharp.ModuleContainer.Emit () <0x001c0> > at Mono.CSharp.AssemblyDefinition.Emit () <0x00124> > at Mono.CSharp.Driver.Compile () <0x00434> > at Mono.CSharp.Driver.Main (string[]) <0x000b0> > at (wrapper runtime-invoke) .runtime_invoke_int_object > (object,intptr,intptr,intptr) <0x00096> > 12 mono0x00010caf mono + 64687 > 13 mono0x0022694a mono + 2251082 > 14 mono0x002294ec mono + 2262252 > 15 mono0x00228751 mono + 2258769 > 16 mono0x000acfff mono + 704511 > 17 mono0x000ad250 mono + 705104 > 18 mono0x000af6bf mono + 714431 > 19 mono0x2134 mono + 4404 > 20 mono0x21c8 mono + 4552 > 21 mono0x1ee5 mono + 3813 > > [ERROR] FATAL UNHANDLED EXCEPTION: Mono.CSharp.InternalErrorException: > /Users/guivho/Mono/Targister/Targister/Classes/BarButtonView.cs(13,16): > ZzLib.BarButtonView.BarButtonView(ZzLib.Txt.Id, int) ---> > System.NullReferenceException: Object reference not set to an instance > of an object > at Mono.CSharp.Parameter.ApplyAttributes > (System.Reflection.Emit.MethodBuilder mb, > System.Reflection.Emit.ConstructorBuilder cb, Int32 index, > Mono.CSharp.PredefinedAttributes pa) [0x0] in :0 > at Mono.CSharp.ParametersCompiled.ApplyAttributes (IMemberContext > mc, System.Reflection.MethodBase builder) [0x0] in unknown>:0 > at Mono.CSharp.Constructor.Emit () [0x0] in :0 > at Mono.CSharp.TypeContainer.EmitConstructors () [0x0] in > :0 > --- End of inner exception stack trace --- > at Mono.CSharp.TypeContainer.EmitConstructors () [0x0] in > :0 > at Mono.CSharp.TypeContainer.EmitType () [0x0] in :0 > at Mono.CSharp.ModuleContainer.Emit () [0x0] in :0 > at Mono.CSharp.AssemblyDefinition.Emit () [0x0] in :0 > at Mono.CSharp.Driver.Compile () [0x0] in :0 > at Mono.CSharp.Driver.Main (System.String[] args) [0x0] in > :0 > > > > Guido > > -- > Someday we'll look back on this moment and plow into a parked car. > -- Evan Davis > > http://vanhoecke.org ... and go2 places! > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Disposing view controllers
Well, yes, I guess you could call it - I doubt there is any harm (try it in Instruments? See if it does release it). The GC is pretty agressive (too agressive at times), so I doubt you'd be saving yourself much, except peace of mind, which is worth a lot :) On 20 February 2013 17:40, Len Charest wrote: > Sure, but Dispose seems like an attractive alternative to the deprecated > ViewDidUnload method for hosting cleanup logic that you'd like to execute > immediately. > > > On Tue, Feb 19, 2013 at 12:23 PM, Nic Wise wrote: >> >> I've never bothered, and it's never been an issue. Just make sure you >> are not holding a reference to it anywhere, and the GC should clean it >> up for you. >> >> On 19 February 2013 17:24, Len Charest wrote: >> > Is it necessary and/or best practice to dispose view controllers that >> > have >> > been popped off of a navigation controller? E.g., programmatically: >> > >> > myNavigationController.PopViewControllerAnimated(true).Dispose(); >> > >> > If so, what is the best way to capture a reference to the controller >> > that is >> > popped when the user touches the back button? (A back button touch does >> > result in a call to PopViewControllerAnimated, but the nav bar delegate >> > does >> > not pass a reference to the target controller in its DidPopItem method.) >> > >> > Thanks, >> > Len >> > >> > ___ >> > MonoTouch mailing list >> > MonoTouch@lists.ximian.com >> > http://lists.ximian.com/mailman/listinfo/monotouch >> > >> >> >> >> -- >> Nic Wise >> t. +44 7788 592 806 | @fastchicken >> b. http://www.fastchicken.co.nz/ > > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Disposing view controllers
I've never bothered, and it's never been an issue. Just make sure you are not holding a reference to it anywhere, and the GC should clean it up for you. On 19 February 2013 17:24, Len Charest wrote: > Is it necessary and/or best practice to dispose view controllers that have > been popped off of a navigation controller? E.g., programmatically: > > myNavigationController.PopViewControllerAnimated(true).Dispose(); > > If so, what is the best way to capture a reference to the controller that is > popped when the user touches the back button? (A back button touch does > result in a call to PopViewControllerAnimated, but the nav bar delegate does > not pass a reference to the target controller in its DidPopItem method.) > > Thanks, > Len > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] UITextView automatic scrolling while typing?
The animation duration is how long the keyboard takes from being invisible to being visible. The code I took it from: https://github.com/nicwise/BTProgressHUD Needs to move it's view at the same speed as the keyboard comes up, rather than waiting for it to finish, then moving it in one go. On 19 February 2013 11:01, Iki wrote: > Hi Nic, > > I have implemented parts from Your solution, one more question though, what > is the purpose of > > animationDuration = > UIKeyboard.AnimationDurationFromNotification(notification) ? > > Because as far as I can see, everything animates without any explicit > declaration of animation. > > Here is my code: > > //WillShow > observer1 = NSNotificationCenter > .DefaultCenter > .AddObserver > ( > UIKeyboard.WillShowNotification > ,delegate(NSNotification notification) > { > RectangleF frame; > if(notification != null) > { > RectangleF kbdRect = UIKeyboard.FrameEndFromNotification(notification); > //double animationDuration = > UIKeyboard.AnimationDurationFromNotification(notification); > > if(notification.Name == UIKeyboard.WillShowNotification || notification.Name > == UIKeyboard.DidShowNotification) > { > if(this.NavigationController.InterfaceOrientation == > UIInterfaceOrientation.Portrait) > { > frame = textView.Frame; > frame.Height -= kbdRect.Height; > textView.Frame = frame; > } > else > { > frame = textView.Frame; > frame.Height -= kbdRect.Width; > textView.Frame = frame; > } > > > } > else > frame = new RectangleF(0,0,0,0); > > > } > else > { > //keyboardHeight = VisibleKeyboardHeight; > } > > > > > } > ); > > > On Feb 19, 2013, at 12:10 AM, Iki wrote: > > Thanks Nic, i will use this instead! > > > On Feb 18, 2013, at 12:38 PM, Nic Wise wrote: > > Thanks for posting this, Iki, I was just doing something simlar the other > day. > > UIKeyboard.BoundsFromNotification has been deprecated, so you might > want to use this: > > if(notification != null) > { > RectangleF keyboardFrame = > UIKeyboard.FrameEndFromNotification(notification); > animationDuration = > UIKeyboard.AnimationDurationFromNotification(notification); > > if(notification.Name == UIKeyboard.WillShowNotification || > notification.Name == UIKeyboard.DidShowNotification) > { > if(IsPortrate(orientation)) > keyboardHeight = keyboardFrame.Size.Height; > else > keyboardHeight = keyboardFrame.Size.Width; > } else > > keyboardHeight = 0; > > } else { > keyboardHeight = VisibleKeyboardHeight; > } > > The FrameEndFromNotifiation is where the keyboard is when the animation > ends. > > > > On 17 February 2013 09:50, Iki wrote: > > Hello everyone, i have found solution, and quite elegant one. It was on my > table the whole time :), inside of a book, Professional iPhone Programming > with MonoTouch and .NET/C# by Wallace B McClure, Martin Bowling, Craig Dunn, > Chris Hardy and Rory Blyth. > > So i hope this may help someone, i have found couple solutions on the net > but they all have some kind of problems … > > So i have UITextView, and the following code in my UIViewController. > > > NSObject observer1, observer2; > > //ViewDidLoad > //Observing Keyboard > notifications--- > //WillShow > observer1 = NSNotificationCenter > .DefaultCenter > .AddObserver > ( > UIKeyboard.WillShowNotification > ,delegate(NSNotification obj) > { > var kbdRect = UIKeyboard.BoundsFromNotification(obj); > var frame = textView.Frame; > frame.Height -= kbdRect.Height; > textView.Frame = frame; > } > ); > //WillHide > observer2 = NSNotificationCenter > .DefaultCenter > .AddObserver > ( > UIKeyboard.WillHideNotification > ,delegate(NSNotification obj) > { > var kbdRect = UIKeyboard.BoundsFromNotification(obj); > var frame = textView.Frame; > frame.Height += kbdRect.Height; > textView.Frame = frame; > > > } > ); > //--- > > //ViewDidUnload (apparently this is only necessary for iOS versions > < 6.0) > //Unsubscribing from observers-- > NSNotificationCenter.DefaultCenter.RemoveObserver(observer1); > NSNotificationCenter.DefaultCenter.RemoveObserver(observer1); > //-- > > > > > On Feb 15, 2013, at 1:13 PM, Iki wrote: > > Hi guys, > > the problem is: > > I have UITextView, stretched trough whole screen. When typing eventually > text will go behind the keyboard, and the only way for me to scroll it i
Re: [MonoTouch] UITextView automatic scrolling while typing?
Thanks for posting this, Iki, I was just doing something simlar the other day. UIKeyboard.BoundsFromNotification has been deprecated, so you might want to use this: if(notification != null) { RectangleF keyboardFrame = UIKeyboard.FrameEndFromNotification(notification); animationDuration = UIKeyboard.AnimationDurationFromNotification(notification); if(notification.Name == UIKeyboard.WillShowNotification || notification.Name == UIKeyboard.DidShowNotification) { if(IsPortrate(orientation)) keyboardHeight = keyboardFrame.Size.Height; else keyboardHeight = keyboardFrame.Size.Width; } else keyboardHeight = 0; } else { keyboardHeight = VisibleKeyboardHeight; } The FrameEndFromNotifiation is where the keyboard is when the animation ends. On 17 February 2013 09:50, Iki wrote: > Hello everyone, i have found solution, and quite elegant one. It was on my > table the whole time :), inside of a book, Professional iPhone Programming > with MonoTouch and .NET/C# by Wallace B McClure, Martin Bowling, Craig Dunn, > Chris Hardy and Rory Blyth. > > So i hope this may help someone, i have found couple solutions on the net > but they all have some kind of problems … > > So i have UITextView, and the following code in my UIViewController. > > > NSObject observer1, observer2; > > //ViewDidLoad > //Observing Keyboard > notifications--- > //WillShow > observer1 = NSNotificationCenter > .DefaultCenter > .AddObserver > ( > UIKeyboard.WillShowNotification > ,delegate(NSNotification obj) > { > var kbdRect = UIKeyboard.BoundsFromNotification(obj); > var frame = textView.Frame; > frame.Height -= kbdRect.Height; > textView.Frame = frame; > } > ); > //WillHide > observer2 = NSNotificationCenter > .DefaultCenter > .AddObserver > ( > UIKeyboard.WillHideNotification > ,delegate(NSNotification obj) > { > var kbdRect = UIKeyboard.BoundsFromNotification(obj); > var frame = textView.Frame; > frame.Height += kbdRect.Height; > textView.Frame = frame; > > > } > ); > //--- > > //ViewDidUnload (apparently this is only necessary for iOS versions > < 6.0) > //Unsubscribing from observers-- > NSNotificationCenter.DefaultCenter.RemoveObserver(observer1); > NSNotificationCenter.DefaultCenter.RemoveObserver(observer1); > //-- > > > > > On Feb 15, 2013, at 1:13 PM, Iki wrote: > > Hi guys, > > the problem is: > > I have UITextView, stretched trough whole screen. When typing eventually > text will go behind the keyboard, and the only way for me to scroll it is to > press return 20 times or so. > Is there any way to accomplish this manually, so that the TextView scroll > automatically as i type? > > Thanks for any help guys/gals! > > > > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Reduce Image Size but not Quality
Sorry, I mis-read it. I thought you wanted to scale the image :) Jason is right: without changing the resolution (x * y) or quality, you can't change the file size. So either drop the quality, or make it have fewer pixels. On 15 February 2013 09:21, Matronix wrote: > I'm trying to be able to take a picture from an iPhone/iPad and then send the > picture to a server for processing. The issue I am having is that when I > take the picture it is 4mb plus and is just too large. I want to reduce the > file's size but not the quality. How would that be done? > > > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/Reduce-Image-Size-but-not-Quality-tp4658070.html > Sent from the MonoTouch mailing list archive at Nabble.com. > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Reduce Image Size but not Quality
This might work, tho check it for memory leaks, and I suspect it might be leaking: https://gist.github.com/nicwise/890460 After that, you have a UIImage, so you can use .AsJpeg(quality) or .AsPNG() to get a compressed image out. If you are about quality over filesize, use PNG, it's lossless. JPEG is lossy, even at 100%. On 15 February 2013 09:21, Matronix wrote: > I'm trying to be able to take a picture from an iPhone/iPad and then send the > picture to a server for processing. The issue I am having is that when I > take the picture it is 4mb plus and is just too large. I want to reduce the > file's size but not the quality. How would that be done? > > > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/Reduce-Image-Size-but-not-Quality-tp4658070.html > Sent from the MonoTouch mailing list archive at Nabble.com. > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Making a ipa for internal distribution
Hi John You might be able to do it by plugging each device you want to put it on into your machine, add it as a "developer device" using xcode, and then setting the signing for that build target to use the developer one. But normally, you need to add devices, and make a specific profile for that build (eg for testflight) as Alejandro detailed. I've not done it the other way, but it _might_ work. You should be able to get the account holder (SteveB@msft? :) ) to add you in as a developer, which should allow you to do profiles and add devices, but given that you only get 100 devices, having an apple account per team, but publishing one the one official MSFT one when you are ready, might be a better way ($99 per team, but still, not bank breaking) You could do an adhoc package with your developer profile (tick the "Enterprise and Adhoc" box under iOS IPA options for that build profile, and pick developer as normal in Bundle Signing), but each device you put it on needs to be developer device (added via xcode). You CAN (if you use testflight) re-sign the build once it's up there, to add more devices (or remove). I've done that to add testers to an existing build. But thats with a "proper" adhoc provisioning profile Sorry, I'm a bit short on time this morning, so if it doesn't work, email back with some more info. The forums are also a good place to go - more people there :) Cheers Nic On 8 February 2013 18:58, John Thornton wrote: > I'm trying to create a .ipa with MT to distribute an app to our internal > test team. Our Apple Developer account is managed by a separate team as we > are a large org and I only have access to certain pieces of > apple.developer.com. In particular I can't create a distribution profile. > > I am told that it is possible to create a adhock package that is signed with > your developer profile. However I can't find anyway to do this in MT. In > fact I don't even seem to get any signing options in Projects->Solution > Options ->Build. I feel like I'm missing something simple but I've searched > to no end. Any help would be greatly appreciated. > > Thanks > > _______ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] MonoDevelop integration with TestFlight
Yes, you still need a profile for testflight - you need a profile (developer, adhoc or appstore) for _everyone_ application which goes on a device. Just some (developer) are done for you when you hit the "make this a development phone" button - or download an app from the store On 7 February 2013 17:20, laithenator wrote: > Hi Steve thank you, that did the trick. > > I get a "no valid iphone code signing keys found in key chain" error now. > > I was under the impression that the profile provisioning step was not > required to upload to testflight? > > Any pointers would be much appreciated. > > Thank you > > > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/MonoDevelop-integration-with-TestFlight-tp4401689p4658063.html > Sent from the MonoTouch mailing list archive at Nabble.com. > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Missing UIImage method?
You could look at how it works, and do the same - its just sending a message. eg: public static class UIImageExtensions { /// /// Description A succinct label that identifies the accessibility element, in a localized string. /// public static UIImage CreateResizableImage_WithMode (this UIImage image, UIEdgeInsets capInsets, UIImageResizingMode resizingMode); { then, looking at how the one works without the resizing mode: UIImage result; using (new NSAutoreleasePool ()) { if (this.IsDirectBinding) { result = (UIImage)Runtime.GetNSObject (Messaging.IntPtr_objc_msgSend_UIEdgeInsets (base.Handle, UIImage.selResizableImageWithCapInsets_, capInsets)); } else { result = (UIImage)Runtime.GetNSObject (Messaging.IntPtr_objc_msgSendSuper_UIEdgeInsets (base.SuperHandle, UIImage.selResizableImageWithCapInsets_, capInsets)); } } return result; So, your method might look like this: public static UIImage Foo(this UIImage image, UIEdgeInsets capInsets, UIImageResizingMode resizingMode) { UIImage result; using (new NSAutoreleasePool ()) { if (image.IsDirectBinding) { result = (UIImage)Runtime.GetNSObject (Messaging.IntPtr_objc_msgSend_UIEdgeInsets_int (image.Handle, new Selector("resizableImageWithCapInsets:resizingMode:"), capInsets, resizingMode)); } else { result = (UIImage)Runtime.GetNSObject (Messaging.IntPtr_objc_msgSend_UIEdgeInsets_int (image.SuperHandle, new Selector("resizableImageWithCapInsets:resizingMode:"), capInsets, resizingMode)); } } return result; } PROBLEMS: IsDirectBinding: I'm not sure how you get that. It's protected, so you MIGHT need to make public class MDImage : UIImage and put the method in there. I think it has something to do with the simulator vrs not Someone like Rolf or Sebastien might be able to help on that tho - if they dont pop up here, ask on the forums. On 7 February 2013 10:46, wrote: > > On 7 Feb 2013, at 10:35, Nic Wise wrote: > >> Thanks - I guess the guys from Xamarin will get to it. These kind of >> binding issues popup from time to time - usually fixed fairly quickly. > > I am curious is there any way you can add a binding just for one method? > Something like the PInvoke syntax? > > Mark Daniel. > > > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Missing UIImage method?
It also would make sense to have that as an overload for CreateResizableImage - looking at the code (CMD-D on the method), its done as a constructor, but its sending an instance method message. File a bug in bugzilla? (or tell me, and I will) On 6 February 2013 18:08, Len Charest wrote: > There's a normal constructor that implements resizableImageWithCapInsets: > resizingMode: > > public UIImage(UIEdgeInsets capInsets, UIImageResizingMode resizingMode) > > > On Wed, Feb 6, 2013 at 9:51 AM, wrote: >> >> The Apple documentation for UIImage has a method >> >> resizableImageWithCapInsets:resizingMode: >> >> UIImage only has >> >> UIImage CreateResizableImage (UIEdgeInsets capInsets); >> >> I was expecting an overload >> >> UIImage CreateResizableImage (UIEdgeInsets capInsets, UIImageResizingMode >> resizingMode); >> >> But there is none. Is this missing from the binding or have I missed >> something? I can't set ResizingMode after >> construction because UIImage is immutable. >> >> Is there a way I can add the missing binding? >> >> Thanks, >> Mark Daniel >> >> >> >> ___ >> MonoTouch mailing list >> MonoTouch@lists.ximian.com >> http://lists.ximian.com/mailman/listinfo/monotouch > > > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] UISegmentedControll without rounded edges
Hi Shawn (second time, this time without the image) How do you mean "the styling capabilities with UIKit are ver poor"? Looking at what you have there, UIAppearance should be able to do that? Or do you need to support iOS4 (not 5+)? Curious, as I've not had issues with UIAppearance except a very few cases. Cheers ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] SoapFormatter
I suggest you either post on the forums (forums.xamarin.com) or email supp...@xamarin.com - It looks like the SoapFormatter might be part of Remoting, which isn't in MonoTouch (and, I suspect, never will be). There may be a workaround which gives you the same output tho. Is there something in WCF which could do the same? Some of the WCF stack is on Monotouch. This might help, too: http://docs.xamarin.com/ios/Guides/Application_Fundamentals/Introduction_to_Web_Services Cheers Nic On 2 February 2013 12:35, Martyn Wendon wrote: > Hi Everyone, > > > > MonoTouch doesn’t appear to include the > System.Runtime.Serialization.Formatters.Soap assembly from Mono, can it be > included? > > > > I am porting a client application to MonoTouch that uses SoapFormatter to > de-serialize stored object states (I’m not able to change the use of Soap > unfortunately) so it would be useful if this was available in MonoTouch. > > > > > > Thanks, > > > > Martyn > > > > > __ > This email has been scanned by the Symantec Email Security.cloud service. > __ > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Why is my initial Plain UITableView rendering not ok.
Hi I tried running your code yesterday (this has been sitting in my "things to look into" since you posted it, I just had servers down in the day job, so I didn't have time to look into it) Glad you got it working! Nic On 1 February 2013 20:09, Guido Van Hoecke wrote: > Hi, > > I found a way to get around this problem and want to share it. > > In the ViewWillAppear I now create a dummy RootElement with an empty > section. That ensures that the Root.TableView as well as > Root.TableView.BackgroundView do exist. I then set the BackgroundView to > null, and set the desired BackgroundColor. > > And then I create the real RootElement, ahter the UITableView settings > heave been done. > > Far from elegant, but it works for Plain as well as Grouped > UITableViewStyles. > > > Guido. > > On 30 January 2013 23:24, Guido Van Hoecke wrote: >> Hi, >> >> I want to use gradient backgrounds for my tableview cells >> (based upon MonoTouch.Dialog StyledStringElements), and I want to >> specify the BackgroundColor of the UITableViews. >> >> After quite some searching and reading I came up with an approach that >> builds on two distinct aspects: >> >> 1. Nullify the TableView.BackgroundView and set the >> TableView.BackgroundColor to the desired color. This is the color that >> shows in the border around Grouped tableview cells. >> >> 2. Set the BackgroundColor as UIColorFromPatternImage(patternImage) for >> all Elements in the UITableView. >> >> My apps allow color selection by the user, so the pattern image is to be >> created dynamically (i.e. for the initial default color and whenever the >> user chooses a different color). >> >> 3. So here's how I create the gradient image: >> >> 3.1. Create a CAGradientLayer using White and the user specified color >> >> 3.2. Create a tiny (44x44) view, set its BackgroundColor to Clear, and >> insert the above gradientLayer as layer 0 using InsertSublLayer. >> >> 3.3. I then render the view in the current context and retrieve it as a >> UIImage file to be used by step 2 above, i.e. as patternImage. >> >> I created a one source demo project demonstrating these techniques. Feel >> free to get it at https://gist.github.com/4677718. Create an empty >> project and replace Main.cs by the Main.cs file from the gist. >> It works as desired, and you can change it to use UITableViewStyle.Plain >> rather than Grouped. It just works. >> >> So here's my problem. I use these techniques in 4 projects for all >> DialogViewControllers and it works fine as long as they use >> UITableViewStyle.Grouped. >> >> But when using UITableviewstyle.Plain the cells that are visible when >> the tableview appears, do not have the GradientColor. It is as if the >> BackgroundColor is Clear: they are rendered with the >> TableView.BackgroundColor as BackgroundColor. >> >> Scrolling cells that are out of view into view shows them with the >> gradient background color. Scrolling 'bad' cells out of view and back >> into view shows them with gradient color. >> >> Clicking one of the buttons so that a next controller is shown, and >> navigating back from that controller again shows all visible cells >> with clear background. Scrolling cells that are out of view into view >> renders them with the gradient color. >> >> The RootElement is (re)created in the ViewWillAppear method, so that any >> changes selected at a more detailed level can be reflected in the >> RootElement. And when populating it in the constructor rather than the >> ViewWillAppear, the debugger shows that the Root.TableView does not >> exist yet, so its BackgroundView can not be nulled, which is essential >> to be able to set the UITableView.BackgroundColor. >> >> I created the little demo project to isolate and hopefully solve this >> problem, but in that project the techniques also work with >> UITableViewStyle.Plain. >> >> Apparently there's still an aspect that differentiates the demo project >> from my apps, but to be honest, I'm out of inspiration. >> >> I hope that some more knowledgeable hacker can suggest something I could >> try or investigate to get this solved. >> >> I am eager to provide any additional information that might be useful to >> track this problem. >> >> >> Guido >> >> -- >> People respond to people who respond. >> >> http://vanhoecke.org ... and go2 places! > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] UISegmentedControll without rounded edges
Hi According to the Apple docs, you have a choice of: UISegmentedControlStylePlain, UISegmentedControlStyleBordered, UISegmentedControlStyleBar, UISegmentedControlStyleBezeled, http://developer.apple.com/library/ios/#documentation/uikit/reference/UISegmentedControl_Class/Reference/UISegmentedControl.html If you just throw a number in there, it might work, but you also might get rejected. You COULD use the UIAppearance API's and see if you can replace the whole background - that might work better and more reliably? UISegmentedControl.Appearance.SetBackgroundImage(theImage, UIControlState.Normal, UIBarMetrics.Default) tho that will effect all of them On 1 February 2013 16:44, Iki wrote: > Hi guys/gals, > > can you tell me the following, if anybody knows: > > In my current project i decided to use UIToolbar on the bottom of my View. > But buttons(UIBarButtonItem) on the UIToolbar can't change their height, > only width. So I create classic UIButton and then add this as custom input > view when creating UIBarButtonItem. > But for some reason this quickly became messy. > > So i decided to use SegmentedControll instead. The thing that bothered me > was that i wast able to remove rounded edges, method CornerRadius is not > working for me. so after little googling, this is what i came up with: > > //segmentedControl.ControlStyle = UISegmentedControlStyle.Bar; > segmentedControl.ControlStyle = (UISegmentedControlStyle)7; > > And with that, i have something very similar to UIToolBar. > > My question is, is this against Apple policies, and what are the chances > that this will get rejected? > > > Thanks and sorry for such long intro :) > > > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] ImageLoader caching
Have a dig into the code (it's on github), but I've used the PurgeCache call and it appears to work? On 31 January 2013 03:26, Dennis Welu wrote: > Using the MonoTouch.Dialog ImageLoader utility. Works nicely. But I've > realized I need fresh images every time I go to a record being loaded from > the server. The cached images seem to be used even across sessions. I've > tried "PurgeCache" but that does not seem to clear the images on disk. Am I > missing something obvious? > > > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/ImageLoader-caching-tp4658025.html > Sent from the MonoTouch mailing list archive at Nabble.com. > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Iphone Show Modal Below NavBar
I'm not sure that you could show something modal _and_ still show the nav bar. you could try putting a nav bar sized transparent view there, so it shows whats under it? Messy, but it might work. The user couldn't interact with it. you could also add the view into the UINavigationController as normal, but use an animation to move it in from the bottom. Xamarin have a seminar on that kind of thing: "Delighting Your Users With CoreAnimation" -> http://xamarin.com/seminars A view ca ne animated like any other property. You could also add a NavBar into your new view, and make it look the same as the one it's covering. Also possibly messy, but that would get you the same result. On 29 January 2013 22:17, Alejandro Vazquez wrote: > Hi, > > I have a UIViewController that has a Navigation Bar in an Iphone App and I > want to show a ViewController in modal state but right now when the modal > appears it covers all the screen and I want it to fly vertically from bottom > to top but It util NavBar. So I can still see the NavBar. > > Is there a property that can handle this or any clue how to deal with it? > > Thanks a lot, > > Alejandro > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Dock UIButtons @ DialogViewController
I'd suggest you work out the location (based on the screen height), and then add a toolbar (with buttons or a segmented control) or even just a normal UIView into whatever the parent view of the DialogViewController is. IE, whatever you added the DVC into, add this one in there, too. If you add it after - or call BringSubviewToFront (or similar) then it'll be on top of the dialog view controller. You could also make the DVC a little smaller (not sure you can do this by default tho) so the bottom element isn't obscured You could also do it like this: Window -UIView (takes up the whole screen) -UIView (height is total height - size of toolbar, just to constrain the size of the DVC) -DialogViewController -ToolBar -Buttons or SegmentView On 29 January 2013 08:41, Iki wrote: > Hi guys, i need some help. > > I currently using MonoTouch.Dialog, to be more specific DialogViewController. > Inside DialogViewController I have only one section with elements. I would > like to have three buttons > docked to the same position (bottom of the screen) , so that the table can > scroll behind them (something like UISegmentedView on the Maps app). > > The problem is if I add them as subview, they will be on the scroll view, and > after each new row is added, they would get pushed away of the screen. For > now the only solution that I came up with is to first create ViewController, > and then inside ViewDidLoad create DialogViewController with Root and > Elements, and then add this as a subview to ViewController. > > > Do You have any better idea how to resolve this? > > > Thanks for your help, as always! > > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Need Monotouch contractor to convert iPad app to iPhone app (graphics too)..
Hi Steve You may need to provide some more info, eg screenshots or a link to the app (I'd be interested, but I'm flat out until April or so) - and asking on the forums (forum.xamarin.com) may get your infront of more people. Cheers Nic On 25 January 2013 22:36, Steve Maddox wrote: > We have a app that has a iPad and iPhone viewcontroller...The iPhone > viewcontroller is old and needs to be removed and replaced with a iphone > version of the iPad... > > Anyone interested? We will paypal... > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Monotouch Dialog Issue with UnevenRows and Scrolled Event
No problem. Setting your own delegate isn't hardcore - thats just how AppKit / iOS works. The Delegate (.NET version - TableView.Scrolled += etc) is just a nice .NET-ism which Xamarin provides. 90% of the time it works great. Now and again, you need to know what it's doing under the hood. On 23 January 2013 20:07, vbisbest wrote: > You are hard core Nic. I tried my own Element with iElementSizing, but that > failed miserably too. I tried your solution and it worked like a champ. > Thanks again! > > Ray > > > > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/Monotouch-Dialog-Issue-with-UnevenRows-and-Scrolled-Event-tp4657998p4658001.html > Sent from the MonoTouch mailing list archive at Nabble.com. > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Monotouch Dialog Issue with UnevenRows and Scrolled Event
Well, this.Root = root; causes the Source to be recreated, which is where the UnevenRows thing is set. It's also handling the Scrolled event, I think. I'm not sure how you get around it, but I think: 1. You create an uneven source (in Root = root;) then kill the Source when you add the Scrolled event (adding an event will usually replace any delegate - or source in this case - if thats where the event hooks into) 2. You hook into the autogenerated delegate with your Scrolled += handleScrolled, but then the Root = root thing kills it. I suggest that you override: public virtual Source CreateSizingSource (bool unevenRows) { return unevenRows ? new SizingSource (this) : new Source (this); } and return your OWN Source / SizingSource. You one does it's own thing in Scrolled, and I'd assume would do the same thing that SizingSource does for size. The classes are public, so you might be able to: public class MySource : DialogViewController.SizingSource { public MySource(DialogViewController container) : base(container) {} public override void Scrolled (UIScrollView scrollView) { base.Scrolled(scrollView); //do your thing - maybe not even call the base! } } and public override Source CreateSizingSource(bool unevenRows) { return new MySource(this); } (and dont hook into TableView.Scrolled at all, BTW. If the scope on the above doesn't work, you'll need to C+P the code out of github into your own project) BTW, the forums might be a better place for these - more people! On 23 January 2013 15:47, vbisbest wrote: > I have a Monotouch.Dialog using plain style. Uneven rows works well until I > hook the Scrolled event. Once I do that, uneven rows quits working. If I > Hook the Scrolled event before the UnevenRows property, then the UnevenRows > works but the Scrolled event never fires. > > This makes UnevenRows not work but Scroll event fires: > RootElement root = new RootElement("Messages"); > root.UnevenRows = true; > root.Add(messageSection); > this.Root = root; > this.TableView.Scrolled += HandleScrolled; > > UneventRows works, but scroll event never fires: > this.TableView.Scrolled += HandleScrolled; > RootElement root = new RootElement("Messages"); > root.UnevenRows = true; > root.Add(messageSection); > this.Root = root; > > Any ideas? Thanks, > Ray > > > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/Monotouch-Dialog-Issue-with-UnevenRows-and-Scrolled-Event-tp4657998.html > Sent from the MonoTouch mailing list archive at Nabble.com. > _______ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] MonoTouch.Dialog - my BackgroundUri does not work
I stand corrected. I CLEARLY need to update my MT.D library! Looking at the code: https://github.com/migueldeicaza/MonoTouch.Dialog/blob/master/MonoTouch.Dialog/Elements.cs#L871 BackgroundUri is only used if BackgroundColor isn't set. So make sure thats null. The Uri uses the image loader, so it might require a HTTP url, not a file one. You could use BackgroundColor with UIColor.FromPattern and pass in your local image (load it with UIImage.FromFile or FromBundle) which is what the Uri one is doing anyway - it's just doing it using the backgroud thread. On 22 January 2013 13:48, Nic Wise wrote: > I've never seen a BackgroundUri property. I've seen Background, which > is normally a UIView (and you can load a UIImage into it with new > UIImageView(UIImage.FromFile("your filename.png")) )? > > that said, I dont use styledstringelement much, so I might have missed it :) > > On 22 January 2013 13:28, Robert Reck wrote: >> Probably just a typo, but in your code you reference a .png file. In your >> text you reference a .jpg file. Are you sure you have the right extension on >> the file name? >> >> Bob >> >> -- >> Bob Reck mailto:rr...@keylogic.com>> >> PII Quality Assurance Auditor >> Senior Applications Developer >> ___ >> www.keylogic.com<http://www.keylogic.com/> >> 443.539.9065 >> 301.621.8920 (fax) >> >> The information contained in this message may be privileged, private and >> protected from disclosure. If the reader of this message is not the intended >> recipient, or an employee or agent responsible for delivering this message >> to the intended recipient, you are hereby notified that any dissemination, >> distribution or copying of this communication is strictly prohibited. If you >> have received this message in error, please notify us immediately by >> replying to the message. >> >> On Jan 22, 2013, at 7:18 AM, "Guido Van Hoecke" >> mailto:gui...@gmail.com>> wrote: >> >> Hi, >> >> I want to use a background image for a StylesStringElement, and somehow >> that does not work. Here's the straightforward code: >> >> Root = new RootElement("I'm the root") { >> new Section { >> new StyledStringElement { >> Caption = "I'm styled", >> TextColor = UIColor.Black, >> BackgroundColor = UIColor.Clear, >> BackgroundUri = new Uri(@"file://Images/MyBackground.png"); >> } >> } >> } >> >> I'd expect to see an element with the MyBackground.jpg, but I get a plain >> white background. The setting of the clear background also has no effect >> at all. >> >> I think that the BackgroundUri is the only straightforward method to set >> a background to replace the plain color background. >> >> But apparently, there's something missing in the state of... >> >> Any suggestions? >> >> >> Guido >> >> -- >> Where am I? Who am I? Am I? I >> >> http://vanhoecke.org ... and go2 places! >> ___ >> MonoTouch mailing list >> MonoTouch@lists.ximian.com<mailto:MonoTouch@lists.ximian.com> >> http://lists.ximian.com/mailman/listinfo/monotouch >> ___ >> MonoTouch mailing list >> MonoTouch@lists.ximian.com >> http://lists.ximian.com/mailman/listinfo/monotouch > > > > -- > Nic Wise > t. +44 7788 592 806 | @fastchicken > b. http://www.fastchicken.co.nz/ -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] MonoTouch.Dialog - my BackgroundUri does not work
I've never seen a BackgroundUri property. I've seen Background, which is normally a UIView (and you can load a UIImage into it with new UIImageView(UIImage.FromFile("your filename.png")) )? that said, I dont use styledstringelement much, so I might have missed it :) On 22 January 2013 13:28, Robert Reck wrote: > Probably just a typo, but in your code you reference a .png file. In your > text you reference a .jpg file. Are you sure you have the right extension on > the file name? > > Bob > > -- > Bob Reck mailto:rr...@keylogic.com>> > PII Quality Assurance Auditor > Senior Applications Developer > ___ > www.keylogic.com<http://www.keylogic.com/> > 443.539.9065 > 301.621.8920 (fax) > > The information contained in this message may be privileged, private and > protected from disclosure. If the reader of this message is not the intended > recipient, or an employee or agent responsible for delivering this message to > the intended recipient, you are hereby notified that any dissemination, > distribution or copying of this communication is strictly prohibited. If you > have received this message in error, please notify us immediately by replying > to the message. > > On Jan 22, 2013, at 7:18 AM, "Guido Van Hoecke" > mailto:gui...@gmail.com>> wrote: > > Hi, > > I want to use a background image for a StylesStringElement, and somehow > that does not work. Here's the straightforward code: > > Root = new RootElement("I'm the root") { > new Section { > new StyledStringElement { > Caption = "I'm styled", > TextColor = UIColor.Black, > BackgroundColor = UIColor.Clear, > BackgroundUri = new Uri(@"file://Images/MyBackground.png"); > } > } > } > > I'd expect to see an element with the MyBackground.jpg, but I get a plain > white background. The setting of the clear background also has no effect > at all. > > I think that the BackgroundUri is the only straightforward method to set > a background to replace the plain color background. > > But apparently, there's something missing in the state of... > > Any suggestions? > > > Guido > > -- > Where am I? Who am I? Am I? I > > http://vanhoecke.org ... and go2 places! > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com<mailto:MonoTouch@lists.ximian.com> > http://lists.ximian.com/mailman/listinfo/monotouch > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] ViewControllerSelected, change to root viewcontroller
Have a look at the NavigationController for that tab (or the NavigationItem, I don't remember at the moment, but you can get one from the other) There is a method on there called something like "PopToRootViewController", which will throw you right back to the top of the stack. If you can't find it, yell out and I'll dig some code out. On 22 January 2013 07:38, Ronny Dahl wrote: > I use a TabBarController to host five NavigationControllers. Let’s say the > user navigates, on the first NavigationController > (ProductListViewController), to a ViewController that is one level in (let’s > call it DetailViewController for simplicity). When the same user switch to > another tab and then comes back to the first tab, he/she is still presented > with the DetailViewController. I do understand that that’s the preferred way > to do things in most cases, but my employer insists on sending the user back > to the ProductListViewController instead. I know the user will be sent back > to the root of the NavigationViewController if he/she clicks the same tab > twice, but that’s not good enough. > > > > I have discovered that the ViewControllerSelected event fires whenever the > tab is changed, but I have yet to discover how to solve the above problem. > Any pointers? > > > > > > Kind regards, > > Ronny Dahl > > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Fwd: App crashes before starting
you can check which architectures are in the .a file with lipo, eg: # lipo libTestFlight.a -info Architectures in the fat file: libTestFlight.a are: armv6 armv7 i386 If you don't have armv7, I'm not sure which other 3 you WOULD have tho - the only possibilities are armv6, armv7, armv7s and i386 If you are using the iOS6 SDK, you NEED i386 (simulator) and armv7 at a minimum - and armv7s if you want to build for that (iPhone 5 only) On 21 January 2013 20:01, Kosta Mihajlov wrote: > Hi, > In our project we are using a custom binding for a pdf manipulation library, > the previous version of the .a files works ok, but now they have shipped > another version of the library and we have issues binding it. > The message i get is: > ld: file is universal (3 slices) but does not contain a(n) armv7 slice: > /var/folders/zc/gthhsjpn6vsdx92bxhs3td4rgn/T/tmp163c8e48.tmp/libPDFNet.a > for architecture armv7 > Same happens when i make a build for a simulator. > > The strange thing to me is that this library works perfectly under an > Xcode-IOS project for both device and simulator builds. > Thanks in advance for your help. > > Regards, > Costa > > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Where is NSTextAlignment?
I think this might be a bug in 6.0.8 (or rather, an omission). File it in Bugzilla? On 17 January 2013 23:04, Len Charest wrote: > UITextAlignment is deprecated. Regardless, I want to use > NSTextAlignment.Natural. > > > On Thu, Jan 17, 2013 at 2:51 PM, Adam Kemp wrote: >> >> Try UITextAlignment. The only difference is that UITextAlignment doesn't >> have "Natural" or "Justified". >> -- >> Adam Kemp >> adam.k...@ni.com >> (512) 683-6058 >> >> >> >> From: Len Charest >> To: monotouch , >> Date: 01/17/2013 04:40 PM >> Subject:[MonoTouch] Where is NSTextAlignment? >> Sent by:monotouch-boun...@lists.ximian.com >> >> >> >> I'm using MonoTouch 6.0.8. I don't see the NSTextAlignment enum defined in >> either MonoTouch.UIKit or MonoTouch.Foundation. Should I be looking >> somewhere else? >> >> Thanks, >> Len___ >> MonoTouch mailing list >> MonoTouch@lists.ximian.com >> http://lists.ximian.com/mailman/listinfo/monotouch >> >> >> ___ >> MonoTouch mailing list >> MonoTouch@lists.ximian.com >> http://lists.ximian.com/mailman/listinfo/monotouch > > > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Blank Dialog EntryElement text on device
I was setting this in an app the other day. Not seeing it now. Neither the app nor the phone has changed. VERY weird. VERY not reproducible too :( On 16 January 2013 12:14, James Darbyshire wrote: > I also intermittently see this issue, not using reflection. > > Restarting the app sometimes fixes the problem. > > Not 100%, but I think it is due to where the EntryElement is created > (LoadView, Ctor etc. ) > > I will post a code example tomorrow. > > Regards, > > James > > On 16/01/2013, at 8:44 AM, Rolf Bjarne Kvinge wrote: > > Hi, > > You're likely using reflection in some way and the managed linker is > removing some of your code. Without an actual sample it's hard to be more > specific though. > > Here is the relevant documentation: > http://docs.xamarin.com/ios/Guides/Advanced_Topics/Linker > > Rolf > > On Sun, Jan 13, 2013 at 7:30 AM, gc898 wrote: >> >> When I use the "Link SDK assemblies only" build option, all my >> MonoTouchDialog.EntryElement cells show no text. I think the text is white >> since data can still be entered and read. >> >> This is only happening on the device. Changing to "Don't Link" causes it >> to >> work normally. >> >> Has anyone seen anything like this before? >> >> >> >> >> >> -- >> View this message in context: >> http://monotouch.2284126.n4.nabble.com/Blank-Dialog-EntryElement-text-on-device-tp4657944.html >> Sent from the MonoTouch mailing list archive at Nabble.com. >> ___ >> MonoTouch mailing list >> MonoTouch@lists.ximian.com >> http://lists.ximian.com/mailman/listinfo/monotouch > > > > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Trying to compile PLP on Mono for MAC with MonoTouch
Ah ok. Maybe ask on the cross platform forum? (you did on the MT forum). On 14 January 2013 08:30, Dawid Mostert wrote: > Aha - thanks > > PLP stands for "Portable Library Project" > > I'm trying to created Portable libraries to share between Mono for Android > and MonoTouch - similar to what is being done for MVVMCross. > > It is working great on the Android side - but lots of problems with Touch. > > Dawid > > > On 14 January 2013 10:18, Nic Wise wrote: >> >> MonoTouch uses it's own internal mono, which is 2.10.something I >> think. So if you built with 3.0.3, it's not going to work - it uses a >> different corelib, and can't link it properly. >> >> Whats PLP? >> >> On 14 January 2013 06:30, dmostert wrote: >> > Hi all, >> > >> > I'm trying to compile PLP projects, but I'm running into a number of >> > problems: >> > >> > This is my sample code from my PLP project: >> > using System; >> > using System.ComponentModel; >> > using System.Windows.Input; >> > >> > namespace PortTest >> > { >> > public class MyClass: INotifyPropertyChanged >> > { >> > public MyClass () >> > { } >> > >> > public event PropertyChangedEventHandler >> > PropertyChanged; >> > public ICommand Command{get;set;} >> > } >> > >> > public static class Extensions >> > { >> > public static void NaString (this string p) >> > { >> > p.ToString(); >> > } >> > } >> > } >> > >> > >> > If I compile this code with Mono MDK 2.10.x, I get an error that >> > ICommand is >> > not found. >> > >> > If I compile this code with Mono MDK 3.0.3, I get an error that >> > extension >> > methods are not available and that I should add a reference to >> > "System.Core". If I manually add >> > >> > namespace System.Runtime.CompilerServices >> > { >> > public class ExtensionAttribute: Attribute >> > { >> > } >> > } >> > >> > I can get the PLP to compile in 3.0.3 >> > >> > BUT >> > >> > When I try to use this PLP in my MonoTouch test app, I run into more >> > problems: >> > Here is the sample code: >> > >> > using System; >> > using System.Collections.Generic; >> > using System.Linq; >> > >> > using MonoTouch.Foundation; >> > using MonoTouch.UIKit; >> > using PortTest; >> > using System.Windows.Input; >> > >> > namespace TouchMulti >> > { >> > public class Application >> > { >> > // This is the main entry point of the application. >> > static void Main (string[] args) >> > { >> > MyClass x = null; >> > ICommand x2 = null; >> > UIApplication.Main (args, null, "AppDelegate"); >> > } >> > } >> > } >> > >> > The 3.0.3 compiled version states that INotifyPropertyChanged is not >> > available and that I should add a reference to System v4.0.0.0 assembly. >> > >> > The 2.10.x version seems to work. >> > >> > Anything that I can try to do differently? >> > >> > Thanks, >> > Dawid >> > >> > >> > >> > -- >> > View this message in context: >> > http://monotouch.2284126.n4.nabble.com/Trying-to-compile-PLP-on-Mono-for-MAC-with-MonoTouch-tp4657946.html >> > Sent from the MonoTouch mailing list archive at Nabble.com. >> > ___ >> > MonoTouch mailing list >> > MonoTouch@lists.ximian.com >> > http://lists.ximian.com/mailman/listinfo/monotouch >> >> >> >> -- >> Nic Wise >> t. +44 7788 592 806 | @fastchicken >> b. http://www.fastchicken.co.nz/ >> >> mobileAgent (for FreeAgent): get your accounts in your pocket. >> http://goo.gl/IuBU >> Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa >> Earnest: Self-employed? Track your business expenses and income. >> http://earnestapp.com >> Nearest Bus: find when the next bus is coming to your stop. >> http://goo.gl/Vcz1p >> London Bike App: Find the nearest Boris Bike, and get riding! >> http://goo.gl/Icp2 > > -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ mobileAgent (for FreeAgent): get your accounts in your pocket. http://goo.gl/IuBU Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa Earnest: Self-employed? Track your business expenses and income. http://earnestapp.com Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2 ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Trying to compile PLP on Mono for MAC with MonoTouch
MonoTouch uses it's own internal mono, which is 2.10.something I think. So if you built with 3.0.3, it's not going to work - it uses a different corelib, and can't link it properly. Whats PLP? On 14 January 2013 06:30, dmostert wrote: > Hi all, > > I'm trying to compile PLP projects, but I'm running into a number of > problems: > > This is my sample code from my PLP project: > using System; > using System.ComponentModel; > using System.Windows.Input; > > namespace PortTest > { > public class MyClass: INotifyPropertyChanged > { > public MyClass () > { } > > public event PropertyChangedEventHandler PropertyChanged; > public ICommand Command{get;set;} > } > > public static class Extensions > { > public static void NaString (this string p) > { > p.ToString(); > } > } > } > > > If I compile this code with Mono MDK 2.10.x, I get an error that ICommand is > not found. > > If I compile this code with Mono MDK 3.0.3, I get an error that extension > methods are not available and that I should add a reference to > "System.Core". If I manually add > > namespace System.Runtime.CompilerServices > { > public class ExtensionAttribute: Attribute > { > } > } > > I can get the PLP to compile in 3.0.3 > > BUT > > When I try to use this PLP in my MonoTouch test app, I run into more > problems: > Here is the sample code: > > using System; > using System.Collections.Generic; > using System.Linq; > > using MonoTouch.Foundation; > using MonoTouch.UIKit; > using PortTest; > using System.Windows.Input; > > namespace TouchMulti > { > public class Application > { > // This is the main entry point of the application. > static void Main (string[] args) > { > MyClass x = null; > ICommand x2 = null; > UIApplication.Main (args, null, "AppDelegate"); > } > } > } > > The 3.0.3 compiled version states that INotifyPropertyChanged is not > available and that I should add a reference to System v4.0.0.0 assembly. > > The 2.10.x version seems to work. > > Anything that I can try to do differently? > > Thanks, > Dawid > > > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/Trying-to-compile-PLP-on-Mono-for-MAC-with-MonoTouch-tp4657946.html > Sent from the MonoTouch mailing list archive at Nabble.com. > ___ > MonoTouch mailing list > MonoTouch@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken b. http://www.fastchicken.co.nz/ mobileAgent (for FreeAgent): get your accounts in your pocket. http://goo.gl/IuBU Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa Earnest: Self-employed? Track your business expenses and income. http://earnestapp.com Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2 ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch