Mot-clé - development

A new release of What to Who is available (1.5.1)

English Français

A new release of What to Who is now available on the AppStore.

What to Who is a tracking application of the borrowed and lent items.

What's new ?

  • Translation fixes

 

PiZyPwm : an easy way to play with PWM on a Raspberry Pi

English Français

PiZyPwm, for Raspberry (Pi) Ea(zy) PWM, is an easy way to implement PWM (Pulse Width Modulation) output on a Raspberry Pi using Python language.

You can get it from its dedicated page.

 

RemoteTone : a Raspberry Pi, an Asus AI Remote, and some noise

English Français

This is a try to work with an Asus AI Remote from a (dead) Asus motherboard package and a Raspberry Pi, using Python programming language.

The buzzer used seems to be a 5V one because of the low sound output on a 3.3V GPIO pin.

The sound wave is a square one as I can't control level outputs (0V or 3.3V only), and the frequency is not very regular (you can hear scratches) due to the buzzer quality and the non real-time quality of the platform : you have to deal with OS interrupts and Python garbage collecting.

Code for RemoteTone can be found at https://github.com/aboudou/remotetone.

 

A new release of RasPiRepCol available (1.2)

English Français

A new release of RasPiRepCol, a project intended to provide a clone of the electronic game Simon is now available.

What's new ?

  • Add hard mode.
  • Updated for RPi.GPIO 0.4.0a

 

A new release of Simple ROT13 Premium is available (1.2)

English Français

A new release of Simple ROT13 Premium is now available on the AppStore.

Simple ROT13 Premium is an utility allowing to cypher a text using ROT13 or L33T ROT13 algorithm, and much more.

What's new ?

  • iOS 6 compatibility.
  • iPhone 5 compatibility.

 

A new release of Simple ROT13 is available (1.3)

English Français

A new release of Simple ROT13 is now available on the AppStore.

Simple ROT13 is an utility allowing to cypher a text using ROT13 or L33T ROT13 algorithm.

What's new ?

  • iOS 6 compatibility.
  • iPhone 5 compatibility.

 

A new release of Simple ROT13 Free is available (1.1)

English Français

Simple ROT13 Free is now available on the AppStore.

Simple ROT13 Free is an utility allowing to cypher a text using ROT13 or L33T ROT13 algorithm.

What's new ?

  • iOS 6 compatibility.
  • iPhone 5 compatibility.

 

A new release of What & Where is available (1.4)

English Français

A new release of What & Where is now available on the AppStore.

What and Where is an application allowing you to compare prices during your shopping sessions into physical stores.

What's new ?

  • iOS 6 compatibility.
  • iPhone 5 compatibility.
  • Interface redesign.

 

A new release of RasPiLEDMeter is available (1.1)

English Français

A new release of RasPiLEDMeter, a project intended to provide a LED usage meter to the Raspberry Pi, is now available.

What's new ?

  • Rewritten in Python

 

iOS How-To : Change color of the selected segment of a UISegmentedControl

English Français

The context

Object UISegmentedControl may be used to act as a tab bar in order to navigate between views, or to act a selector between many choices. In the case of a UISegmentedControl with UISegmentedControlStyleBar style, the selected segment is only darker than the unselected ones. Depending on the control's tint color, the distinction may be difficult to see (example below).

Standard behavior for UISegmentedControl

The goal of this post is to show that with a few code, it's possible to obtain an other behavior, with a selected segment differently colored than the others (example below)

Better behavior for UISegmentedControl

The code

First of all, you'll find at the end of this post a zip archive containing an XCode project with the code used for this post. From now until the end of this post, you'll have to keep the following elements in mind:

  • UISegmentedControl object must use UISegmentedControlStyleBar style (mandatory).
  • A selector on “Value Changed” points on the method “-(IBAction)selectSegment:(id)sender” (adapt to fit your needs).

You have to append to the class where you use UISegmentedControl object a function which sorts UIView by their horizontal coordinates:

NSInteger static compareViewsByOrigin(id sp1, id sp2, void *context)
{
    // UISegmentedControl segments use UISegment objects (private API). But we can safely cast them to UIView objects.
    float v1 = ((UIView *)sp1).frame.origin.x;
    float v2 = ((UIView *)sp2).frame.origin.x;
    if (v1 < v2)
        return NSOrderedAscending;
    else if (v1 > v2)
        return NSOrderedDescending;
    else
        return NSOrderedSame;
}

Then, append to “-(IBAction)selectSegment:(id)sender” method the following code:

// Get number of segments
    int numSegments = [betterSegmentedControl.subviews count];
 
    // Reset segment's color (non selected color)
    for( int i = 0; i < numSegments; i++ ) {
        // reset color
        [[betterSegmentedControl.subviews objectAtIndex:i] setTintColor:nil];
        [[betterSegmentedControl.subviews objectAtIndex:i] setTintColor:[UIColor colorWithRed:200/255.0 green:200/255.0 blue:200/255.0 alpha:1]];
    }
 
    // Sort segments from left to right
    NSArray *sortedViews = [betterSegmentedControl.subviews sortedArrayUsingFunction:compareViewsByOrigin context:NULL];
 
    // Change color of selected segment
    [[sortedViews objectAtIndex:betterSegmentedControl.selectedSegmentIndex] setTintColor:[UIColor colorWithRed:255/255.0 green:0/255.0 blue:0/255.0 alpha:1]];
 
    // Remove all original segments from the control
    for (id view in betterSegmentedControl.subviews) {
        [view removeFromSuperview];
    }
 
    // Append sorted and colored segments to the control
    for (id view in sortedViews) {
        [betterSegmentedControl addSubview:view];
    }

And that's all !

 

iOS How-To : Using Core Data with iCloud

English Français

Disclaimer

Core Data with iCloud seems not to be really mature. This How-To should work, but you may encounter some oddities (mainly synchronization errors or corrupted transaction log). You may refer to the following thread (iOS Developer account needed) for more information. In the meantime, I do not recommend you to use this feature in a production environment.

End of disclaimer

One of iOS new feature is iCloud, which allow the possibility to synchronize data between different iOS devices. These data may be file, but may also be records from a Core Data database. Examples about how to use Core Data with iCloud are hard to find and often incomplete, that's why I wrote this how-to.

Lire la suite...

 

iOS How-To : Duplicate settings between two iOS versions of the Simulator

English Français

With each XCode update, a new iOS version is available, sometimes replacing an older one. And in this case, user's settings and data are reseted. Here's the way to transfer these data from a previous iOS version to a new one.

Lire la suite...

 

iOS How-To : Displaying picture of a contact from address book

English Français

Displaying picture of a contact from the address book is a relatively easy at first, but unfortunately behaves differently depending on the version of the OS. Here's what to consider, and the limitations.

Lire la suite...

 

NOCC Webmail and Wii

English Français

NOCC webmail / Wii

As you can see, NOCC webmail works perfectly with Wii browser (Wii uses Opera browser). The only non functional thing is attachment adding as the related HTML control is disabled by the browser.