Lors d'une petite session de programmation iOS, j'ai voulu créer une vue personnalisée composée de différentes subviews. Je souhaitais gérer les comportements des vues enfants en fonction de leur tags respectifs et mon programme ne réagissait pas comme je le souhaitais. Après un long moment à fouiner dans la doc sans avoir de réponse (si quelqu'un trouve une info, je suis preneur), j'ai trouvé la réponse à mon problème.
Le selecteur addSubview de la classe UIView modifie la valeur des tags des différentes vues que vous passez en arguments. Il vous faut fixer la valeur des tags des différentes vues APRÈS avoir utilisé la méthode addSubview.
Affichage des articles dont le libellé est mac os x. Afficher tous les articles
Affichage des articles dont le libellé est mac os x. Afficher tous les articles
mardi 30 octobre 2012
AddSubView, Tag et gestion d'UIView Custom
Libellés :
addSubview,
iOS,
mac os x,
objective-c,
tag,
UIView
Pays/territoire :
Illkirch-Graffenstaden, France
mercredi 20 juin 2012
Compile OpenCV 2.4.1 on Mac Os X Lion
After looking an episode of TBBT concerning a OCR iPhone app, I was considering to develop a real one or at least a prototype. From my old memories, I thought directly to the OpenCV library and I was glad to see that an android port was in high development stage. By the way, before trying to work on an Android OCR app, I wanted to start softly with a basic program on my Mac. On the main website I saw the simple way to get it worked was using fink, macports or homebrew :( Those tools are very good but I wanted a fresh compilation. I simply download the last stable version which uses the CMake system to compile all the framework. Really simple, but I experienced some linking errors that are due to, I suppose, to the fact that I don't have ffmpeg installed on my system. It seemed to miss a MP3 lame library and a faac library.
Fisrt start by downloading and compile the lame library (3.99.5 worked fine) from http://lame.sourceforge.net/:
tar xzvf lame-3.99.5.tar.gz
cd lame-3.99.5
./configure
make
sudo make install
Same thing with the faac library (1.28 worked fine) at http://www.audiocoding.com/downloads.html:
tar xjvf faac-1.28.tar.bz2
cd faac-1.28
./configure
make
sudo make install
The error came from the highgui module. To fixed it, I edited the modules/highgui/CMakeLists.txt to link to the previous compiled library. You can use this patch file (patch -p0 < opencv_lion.patch) or edit the modules/highgui/CMakeLists.txt to add those lines :
list(APPEND HIGHGUI_LIBRARIES ${BZIP2_LIBRARIES} -lmp3lame -lbz2 -lfaac)
endif(APPLE)
Inscription à :
Articles (Atom)