• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Small delay when build the view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Small delay when build the view


  • Subject: Small delay when build the view
  • From: Daniel Lopes <email@hidden>
  • Date: Fri, 17 Sep 2010 14:33:19 -0300

Hello, I'm studing cocoa and trying to create an app as closest as possible
of a real app. It's a simple app the consume the rest api of Gist (
gist.github.com). My source code is in github (
http://github.com/danielvlopes/Snipper)

I started separating all the components of my screen in to diferent nibs and
ViewControllers. Everything is ok, but I have a strange behavior when I load
the views for my Splitview.

I have the following nibs:
MainMenu.xib
MainWindow.xib
SidebarView.xib
ContentView.xib

My MainWindow.xib is controlled by MainWindowController and in that file I
load the other nibs inside the splitview that lives in MainWindow.xib. I
also do a HTTP request to load my snippets inside a model called Library. In
the line bellow I create the controllers for both sides of splitView and
added him as subviews.

http://github.com/danielvlopes/Snipper/blob/master/Classes/Controllers/MainWindowController.m#L47

This method is called in initWithWindowNibName and right after that I call
the method to do the HTTP request. The problem is that HTTP request delays
the return of self in initWithWindowNibName and this causes a blank screen
before it finish. There is any way to do the HTTP request assincronously?

The images of the problem:
http://cl.ly/2QdS and http://cl.ly/2Qfi

Thanks in advance and sorry for the big question.

--
Daniel Lopes
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Scripting Bridge Strange Pauses
  • Next by Date: Re: Why is NSPopUp broken in drop-down mode?
  • Previous by thread: Re: Programmatic View Question
  • Next by thread: How to invoke and inline block which is passed as function argument
  • Index(es):
    • Date
    • Thread