iOS scrollable UINavigationBar follows UIScrollView

Inspired by the navigation bar functionality seen in Chrome, Facebook and Instagram iOS apps which it can shrink or expand based on the scrolling of a UIScrollView object such as UITableView, I have coded a custom navigation bar, called GTScrollNavigationBar at https://github.com/luugiathuy/GTScrollNavigationBar.

Screenshots:

GTScrollNavigationBar1 GTScrollNavigationBar2

Continue reading

iOS7 interactivePopGestureRecognizer for UINavigationController with hidden navigation bar

iOS7 introduces interactivePopGestureRecognizer property which is used for popping current view controller stack by a gesture (swipe right gesture from left edge as default). However if the navigation bar is hidden or the app uses a custom back button for navigation bar, this feature will not work. A bit lines of code can make this feature works again for those cases. Continue reading

GLSL Shader Manager OpenGL

Nowadays most of OpenGL applications use shaders (programmable pipeline) for rendering effects on graphics hardware instead of old provided functions in OpenGL 1.0 (fixed-function pipeline). There are many advantages of using shaders, such as performing arbitrary transformations on vertices and pixels, easily maintaining effect algorithms, etc. In this post I will share with you how I load, link and manage GLSL shaders in my projects. Continue reading

Create Frame Buffer Object OpenGL

In OpenGL, frame buffer is the final destination in the rendering pipeline. When we create a window for our OpenGL application, it automatically create frame buffer object for us. However we need to create our own frame buffer object in some cases, such as offscreen rendering. OpenGL applications in iOS also need to create frame buffer object. In this post, I will share with you how we can create a frame buffer object (FBO). Continue reading

File Download Manager in Java

Download manager is a program that helps us download files from Internet efficiently. The program can pause or resume downloads. It also can split the files to be downloaded into 2 or more segments, which are processed in parallel, making the download faster. In this post, I will share with you how I write a download manager program in Java with those features. Continue reading

Simple Web Proxy Python

When I was in year 3, I studied the module “Computer Network 2″. There was an assignment about implementation of a simple web proxy. In this post, I will share with you my program for the assignment (written in Python).

The proxy sits between the client (usually web browser) and the server (web server). In our simple case, the client sends all its requests to the proxy instead of sending requests directly to the server. The proxy then opens a connection to the server, and passes on the client’s request. Continue reading

Simple Android and Java Bluetooth Application

Last week was my school’s recess week. I had a lot of free time and decided to learn Java and Android Bluetooth by reading the Bluetooth development guide for Android. Then I had an idea to make my Android phone become a simple remote control for my laptop, just for controlling the Power Point slides for presentation. The volume up and volume down become buttons for going to next and previous slide respectively. Continue reading