Question: I'm trying to hide my UITextField in my app. 
I first tried to do it with a UIButton.. 

Therefor I made this: 

```
-(IBAction)hide:(id)sender {

_textField.hidden = !_textField.hidden;

}

```

This worked but now I'm trying to do it automatically after editing so I wrote this code: 

```
 -(void)textFieldDidEndEditing:(UITextField *)textField {

 textField.hidden = YES;

 }

```

In the .h I put this code: 

```
-(void)textFieldDidEndEditing:(UITextField *)textField;

```

Could anyone tell me why this isn't working? 

Is it possible to hide it with an animation? 
I tried this which wasn't working:

```
[UIView animateWithDuration:2.0 animations:^
{ code.. }
]

```

Thanks for helping me!

Answer: 
What you want is a style of a "COLUMN BASED" memory access

You can easily implement it using `std::vector` as your column type or create your own "column" type with your own underlying memory management - but `std::vector` should work just fine

Now once you have your column type you create your "TABLE" type.

In a way your table cab be just a vector of vectors. You can of course wrap it up in order to get better looking accessors (If you want to access by row (object) first and column (property) after.

This is I think the best general approach.

Even In your specific case - since you want to save memory using bit length flags, as mentioned by Bart van Ingen Schenau you can use a `vector<bool>` so the general approach stands
I would use parrallel arrays to meet the requirements:

```
template <int nd>
class CellAccessor {
public:
    enum { DELETE = 0, ///< Cell marked for deletion
           REFINE = 1, ///< Cell marked for refinement
           //...
           NUM_FLAGS
    }; ///< Enum for the flags.
    CellAccessor(int numCells) {
        for (int i=0; i<NUM_FLAGS; i++) { m_flags[i] = new bool[numCells]; }
        m_order = new int[numCells];
        for (int i=0; i<nd; i++) { m_coordinates[i] = new double[numCells]; }
    }
    // Destructor, copy-constructor & assignment operator omitted for brevity

    template<int F> inline bool& flags(const int cellId) {
        return m_flags[F][cellId]; }
    inline bool& flags(const int cellId, int flag) {
        return m_flags[flag][cellId]; }
    inline int& order(const int cellId) {
        return m_order[cellId]; }
    template<int i> inline double& coordinates(const int cellId) {
        return m_coordinates[i][cellId]; }
    inline double& coordinates(const int cellId, int i) {
        return m_coordinates[i][cellId]; }

private:
    bool* m_flags[NUM_FLAGS];
    int*  m_order;
    double* m_coordinates[nd];
};

```